Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Maintenance/3.3/WebApp/plugin/pluginCtrl.js @ 12761

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

#2429: Worked on the maintenance WebApp plugin:

  • Space Usage Page: Displays the number of rows and allocated disk space for every database table
  • Plugin Page: Shows unused plugins and provides functionality to delete all and specific plugins
  • FactTask Page: Allows to aggregate all Job Tasks to a single task for a given job or jobs within an selected time period
  • FactClientInfo Page: Allows to aggregate consecutive FactClientInfo entries with the same state and isallowedtocalculate flag
File size: 1.5 KB
Line 
1(function () {
2    var module = appMaintenancePlugin.getAngularModule();
3    module.controller('app.maintenance.pluginCtrl',
4        ['$scope', '$interval', 'app.maintenance.pluginService', function ($scope, $interval, pluginService) {
5            $scope.interval = defaultPageUpdateInterval;
6            $scope.curPluginsPage = 1;
7            $scope.pluginsPageSize = 20;
8
9            var getUnusedPlugins = function () {
10                pluginService.getUnusedPlugins({ page: $scope.curPluginsPage, size: $scope.pluginsPageSize }, function (pluginPage) {
11                    $scope.pluginPage = pluginPage;
12                });
13            };
14
15            $scope.deletePlugin = function(id) {
16                pluginService.deletePlugin({ id: id }, function() {
17                    getUnusedPlugins();
18                });
19            };
20
21            $scope.deleteUnusedPlugins = function() {
22                pluginService.deleteUnusedPlugins({}, function() {
23                    getUnusedPlugins();
24                });
25            };
26
27            $scope.changePluginsPage = function () {
28                getUnusedPlugins();
29            };
30
31            $scope.updateInterval = $interval(getUnusedPlugins, $scope.interval);
32            var cancelInterval = $scope.$on('$locationChangeSuccess', function () {
33                $interval.cancel($scope.updateInterval);
34                cancelInterval();
35            });
36            getUnusedPlugins(); // init page
37        }]
38    );
39})();
Note: See TracBrowser for help on using the repository browser.