Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.Services.WebApp.Maintenance/3.3/WebApp/factclientinfo/factclientinfoCtrl.js @ 16581

Last change on this file since 16581 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.1 KB
Line 
1(function () {
2    var module = appMaintenancePlugin.getAngularModule();
3    module.controller('app.maintenance.factclientinfoCtrl',
4        ['$scope', '$interval', 'app.maintenance.factclientinfoService', function ($scope, $interval, factclientinfoService) {
5            $scope.interval = defaultPageUpdateInterval;
6            $scope.entries = 2;
7
8            $scope.fromDate = new Date();
9            $scope.toDate = new Date();
10
11            $scope.fromIsOpen = false;
12            $scope.toIsOpen = false;
13
14            $scope.openFromDateSelection = function ($event) {
15                $event.preventDefault();
16                $event.stopPropagation();
17                $scope.toIsOpen = false;
18                $scope.fromIsOpen = true;
19            };
20
21            $scope.openToDateSelection = function ($event) {
22                $event.preventDefault();
23                $event.stopPropagation();
24                $scope.fromIsOpen = false;
25                $scope.toIsOpen = true;
26            };
27
28            $scope.dateOptions = {
29                formatYear: 'yy',
30                startingDay: 1
31            };
32
33            $scope.getFactClientInfo = function () {
34                factclientinfoService.getFactClientInfo({
35                    start: ConvertFromDate($scope.fromDate),
36                    end: ConvertToDate($scope.toDate)
37                },
38                function (factClientInfo) {
39                    $scope.factClientInfo = factClientInfo;
40                    $scope.aggregateStartDate = ConvertFromDate($scope.fromDate);
41                    $scope.aggregateEndDate = ConvertToDate($scope.toDate);
42                });
43            };
44
45            $scope.aggregate = function () {
46                factclientinfoService.aggregate({
47                    start: $scope.aggregateStartDate,
48                    end: $scope.aggregateEndDate,
49                    entries: $scope.entries
50                }, function () {
51                    $scope.getFactClientInfo();
52                });
53            };
54
55            $scope.getFactClientInfo(); // init page
56        }]
57    );
58})();
Note: See TracBrowser for help on using the repository browser.