Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/exceptions/exceptionsCtrl.js @ 15544

Last change on this file since 15544 was 12560, checked in by dglaser, 9 years ago

#2388:

HeuristicLab.Services.WebApp-3.3:

  • updated about page

HeuristicLab.Services.WebApp.Statistics-3.3:

  • added missing files
File size: 2.0 KB
Line 
1(function () {
2    var module = appStatisticsPlugin.getAngularModule();
3    module.controller('app.statistics.exceptionsCtrl',
4        ['$scope', '$interval', '$modal', 'app.statistics.exceptionService',
5            function ($scope, $interval, $modal, exceptionService) {
6                $scope.interval = defaultPageUpdateInterval;
7                $scope.curExceptionsPage = 1;
8                $scope.exceptionsPageSize = 20;
9
10                var getExceptions = function () {
11                    exceptionService.getExceptions({ page: $scope.curExceptionsPage, size: $scope.exceptionsPageSize },
12                        function (exceptionPage) {
13                            $scope.exceptionPage = exceptionPage;
14                        }
15                    );
16                };
17
18                $scope.changeExceptionsPage = function () {
19                    update();
20                };
21
22                var update = function () {
23                    getExceptions();
24                };
25
26                $scope.openDialog = function (message) {
27                    $scope.message = message;
28                    $modal.open({
29                        templateUrl: 'plugin=statistics&view=WebApp/exceptions/exceptionDetailsDialog.cshtml',
30                        controller: 'app.statistics.exceptionDetailsDialogCtrl',
31                        windowClass: 'app-modal-window',
32                        resolve: {
33                            message: function () {
34                                return $scope.message;
35                            }
36                        }
37                    });
38                };
39
40                $scope.updateInterval = $interval(update, $scope.interval);
41                var cancelInterval = $scope.$on('$locationChangeSuccess', function () {
42                    $interval.cancel($scope.updateInterval);
43                    cancelInterval();
44                });
45                update();
46            }
47        ]
48    );
49})();
Note: See TracBrowser for help on using the repository browser.