{"size": 1396, "ext": "js", "max_stars_repo_path": "src/main/webapp/web-resource/js/producer.js", "max_stars_repo_name": "didapinchegit/rocket-console", "max_stars_repo_stars_event_min_datetime": "2017-01-09T01:51:18.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-01T09:19:48.000Z", "max_issues_repo_path": "src/main/webapp/web-resource/js/producer.js", "max_issues_repo_name": "didapinchegit/rocket-console", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/main/webapp/web-resource/js/producer.js", "max_forks_repo_name": "didapinchegit/rocket-console", "max_forks_repo_forks_event_min_datetime": "2017-01-09T01:40:26.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-07T08:43:22.000Z"}
{"max_stars_count": 40, "max_issues_count": null, "max_forks_count": 52, "avg_line_length": 35.7948717949, "max_line_length": 92, "alphanum_fraction": 0.4978510029}
(function () {
    var module = angular.module('producerApp', ['localytics.directives','ui-notification']);
    module.run(function ($http) {
        $http.defaults.headers.common = {'X-Requested-With': 'XMLHttpRequest'};
    });
    module.controller('producerController', function ($scope, $http,Notification) {
        $scope.selectedTopic=[];
        $scope.producerGroup="";
        $http({
            method: "GET",
            url: "/topic/list.query"
        }).success(function (resp) {
            if(resp.status ==0){
                $scope.allTopicList = resp.data.topicList.sort();
                console.log($scope.allTopicList);
            }else {
                Notification.error({message: resp.errMsg, delay: 2000});
            }
        });
        $scope.queryClientByTopicAndGroup = function () {
            $http({
                method: "GET",
                url: "/producer/producerConnection.query",
                params:{
                    topic:$scope.selectedTopic,
                    producerGroup:$scope.producerGroup
                }
            }).success(function (resp) {
                if(resp.status ==0){
                    $scope.connectionList = resp.data.connectionSet;
                }else {
                    Notification.error({message: resp.errMsg, delay: 2000});
                }
            });
        }
    } );

}).call(this);
