Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Maintenance/3.3/WebApp/facttask/facttaskCtrl.js @ 13321

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

#2429:

  • Removed auto refresh on FactTask and FactClientInfo page
  • Added AssemblyInfo.cs.frame
  • Added x64 and x86 project configuration settings
File size: 2.3 KB
RevLine 
[12761]1(function () {
2    var module = appMaintenancePlugin.getAngularModule();
3    module.controller('app.maintenance.facttaskCtrl',
4        ['$scope', '$interval', 'app.maintenance.facttaskService', function ($scope, $interval, facttaskService) {
5            $scope.interval = defaultPageUpdateInterval;
6            $scope.curJobsPage = 1;
7            $scope.jobsPageSize = 20;
8
9            $scope.fromDate = new Date();
10            $scope.toDate = new Date();
11
12            $scope.fromIsOpen = false;
13            $scope.toIsOpen = false;
14
15            $scope.openFromDateSelection = function ($event) {
16                $event.preventDefault();
17                $event.stopPropagation();
18                $scope.toIsOpen = false;
19                $scope.fromIsOpen = true;
20            };
21
22            $scope.openToDateSelection = function ($event) {
23                $event.preventDefault();
24                $event.stopPropagation();
25                $scope.fromIsOpen = false;
26                $scope.toIsOpen = true;
27            };
28
29            $scope.dateOptions = {
30                formatYear: 'yy',
31                startingDay: 1
32            };
33
34            $scope.getJobs = function () {
35                facttaskService.getJobs({
36                    start: ConvertFromDate($scope.fromDate),
37                    end: ConvertToDate($scope.toDate),
38                    page: $scope.curJobsPage,
39                    size: $scope.jobsPageSize
40                },
41                function (jobPage) {
42                    $scope.jobPage = jobPage;
43                });
44            };
45
46            $scope.aggregateJob = function (id) {
47                facttaskService.aggregateJob({ id: id }, function () {
48                    $scope.getJobs();
49                });
50            };
51
52            $scope.aggregateAllJobs = function () {
53                facttaskService.aggregateAllJobs({
54                    start: ConvertFromDate($scope.fromDate),
55                    end: ConvertToDate($scope.toDate)
56                },
57                function () {
58                    $scope.getJobs();
59                });
60            };
61
62            $scope.changeJobsPage = function () {
63                $scope.getJobs();
64            };
65
66            $scope.getJobs(); // init page
67        }]
68    );
69})();
Note: See TracBrowser for help on using the repository browser.