Last change
on this file since 12878 was
12525,
checked in by dglaser, 9 years ago
|
#2388:
HeuristicLab.Services.WebApp.Statistics-3.3:
- added groups page
- improved jobs, clients and users pages
HeuristicLab.Services.WebApp-3.3:
|
File size:
1.2 KB
|
Rev | Line | |
---|
[12525] | 1 | (function () {
|
---|
| 2 | var module = appStatisticsPlugin.getAngularModule();
|
---|
| 3 | module.controller('app.statistics.groupsCtrl',
|
---|
| 4 | ['$scope', '$interval', 'app.statistics.groupService',
|
---|
| 5 | function ($scope, $interval, groupService) {
|
---|
| 6 | $scope.interval = defaultPageUpdateInterval;
|
---|
| 7 | $scope.curGroupsPage = 1;
|
---|
| 8 | $scope.groupsPageSize = 20;
|
---|
| 9 |
|
---|
| 10 | var getGroups = function () {
|
---|
| 11 | groupService.getGroups({ page: $scope.curGroupsPage, size: $scope.groupsPageSize },
|
---|
| 12 | function (groupPage) {
|
---|
| 13 | $scope.groupPage = groupPage;
|
---|
| 14 | }
|
---|
| 15 | );
|
---|
| 16 | };
|
---|
| 17 |
|
---|
| 18 | var update = function () {
|
---|
| 19 | getGroups();
|
---|
| 20 | };
|
---|
| 21 |
|
---|
| 22 | $scope.changeGroupsPage = function () {
|
---|
| 23 | update();
|
---|
| 24 | };
|
---|
| 25 |
|
---|
| 26 | $scope.updateInterval = $interval(update, $scope.interval);
|
---|
| 27 | var cancelInterval = $scope.$on('$locationChangeSuccess', function () {
|
---|
| 28 | $interval.cancel($scope.updateInterval);
|
---|
| 29 | cancelInterval();
|
---|
| 30 | });
|
---|
| 31 | update(); // init page
|
---|
| 32 | }]
|
---|
| 33 | );
|
---|
| 34 | })(); |
---|
Note: See
TracBrowser
for help on using the repository browser.