Changeset 12516 for branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients
- Timestamp:
- 06/25/15 18:34:40 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 12470-12476,12478-12482,12485,12488,12490-12494,12496-12497,12504,12506-12507,12509,12511-12512,12514
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3
-
Property
svn:global-ignores
set to
obj
-
Property
svn:ignore
set to
bin
-
Property
svn:global-ignores
set to
-
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clients.cshtml
r12477 r12516 1 1 @using HeuristicLab.Services.Access.DataTransfer 2 2 @using HeuristicLab.Services.Hive 3 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) {4 3 <header class="view-header"> 5 4 <ul class="nav nav-list nav-list-topbar pull-left"> 6 <li> 7 <a ng-href="#/statistics/jobs">Jobs</a> 8 </li> 5 <li> 6 <a ng-href="#/statistics/jobs">Jobs</a> 7 </li> 8 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) 9 { 9 10 <li> 10 11 <a ng-href="#/statistics/users">Users</a> 11 12 </li> 12 <li class="active"> 13 <a ng-href="#/statistics/clients">Clients</a> 14 </li> 13 } 14 <li class="active"> 15 <a ng-href="#/statistics/clients">Clients</a> 16 </li> 15 17 </ul> 16 18 </header> 17 19 18 20 <div class="default-view-container"> 21 <div class="row"> 22 <div class="col-lg-12"> 23 <div class="panel panel-default"> 24 <div class="panel-heading"> 25 <h3 class="panel-title">Current Clients</h3> 26 </div> 27 <div class="panel-body"> 28 <table class="table table-hover table-condensed"> 29 <thead> 30 <tr> 31 <th>#</th> 32 <th>Client Name</th> 33 <th>Cores</th> 34 <th>Cpu Utilization</th> 35 <th>State</th> 36 <th></th> 37 </tr> 38 </thead> 39 <tr ng-repeat="client in clientPage.Clients"> 40 <td>{{($index + 1)+((curClientsPage-1)*(clientsPageSize))}}</td> 41 <td>{{client.Name}}</td> 42 <td>{{client.UsedCores}} / {{client.TotalCores}}</td> 43 <td>{{client.CpuUtilization | number: 2}} %</td> 44 <td>{{client.State}}</td> 45 <td> 46 <a ng-href="#/statistics/clients/{{client.Id}}">Details</a> 47 </td> 48 </tr> 49 <tr ng-hide="clientPage.Clients.length"> 50 <td colspan="6" class="text-center">No clients found!</td> 51 </tr> 52 </table> 53 <div class="row text-center" ng-show="clientPage.TotalClients > clientPage.Clients.length"> 54 <pagination max-size="10" total-items="clientPage.TotalClients" ng-model="curClientsPage" ng-change="changeClientsPage()" items-per-page="clientsPageSize" 55 boundary-links="true" rotate="false" num-pages="numPages"></pagination> 56 </div> 57 </div> 58 </div> 59 </div> 60 </div> 19 61 62 <div class="row"> 63 <div class="col-lg-12"> 64 <div class="panel panel-default"> 65 <div class="panel-heading"> 66 <h3 class="panel-title">Expired Clients</h3> 67 </div> 68 <div class="panel-body"> 69 <table class="table table-hover table-condensed"> 70 <thead> 71 <tr> 72 <th>#</th> 73 <th>Client Name</th> 74 <th>Cores</th> 75 <th>Cpu Utilization</th> 76 <th>State</th> 77 <th></th> 78 </tr> 79 </thead> 80 <tr ng-repeat="client in expiredClientPage.Clients"> 81 <td>{{($index + 1)+((curExpiredClientsPage-1)*(expiredClientsPageSize))}}</td> 82 <td>{{client.Name}}</td> 83 <td>{{client.UsedCores}} / {{client.TotalCores}}</td> 84 <td>{{client.CpuUtilization | number: 2}} %</td> 85 <td>{{client.State}}</td> 86 <td> 87 <a ng-href="#/statistics/clients/{{client.Id}}">Details</a> 88 </td> 89 </tr> 90 <tr ng-hide="expiredClientPage.Clients.length"> 91 <td colspan="6" class="text-center">No expired clients found!</td> 92 </tr> 93 </table> 94 <div class="row text-center" ng-show="expiredClientPage.TotalClients > expiredClientPage.Clients.length"> 95 <pagination max-size="10" total-items="expiredClientPage.TotalClients" ng-model="curExpiredClientsPage" ng-change="changeExpiredClientsPage()" items-per-page="expiredClientsPageSize" 96 boundary-links="true" rotate="false" num-pages="numPages"></pagination> 97 </div> 98 </div> 99 </div> 100 </div> 101 </div> 20 102 </div> 21 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clientsCtrl.js
r12477 r12516 2 2 var module = appStatisticsPlugin.getAngularModule(); 3 3 module.controller('app.statistics.clientsCtrl', 4 ['$scope', 'app.statistics.data.service', function($scope, statisticsService) { 5 4 ['$scope', '$interval', 'app.statistics.clientService', 5 function ($scope, $interval, clientService) { 6 $scope.interval = defaultPageUpdateInterval; 7 $scope.curClientsPage = 1; 8 $scope.clientsPageSize = 20; 9 $scope.curExpiredClientsPage = 1; 10 $scope.expiredClientsPageSize = 20; 11 12 var getClients = function () { 13 clientService.getClients({ page: $scope.curClientsPage, size: $scope.clientsPageSize, expired: false }, 14 function (clientPage) { 15 $scope.clientPage = clientPage; 16 } 17 ); 18 }; 19 20 var getExpiredClients = function() { 21 clientService.getClients({ page: $scope.curExpiredClientsPage, size: $scope.expiredClientsPageSize, expired: true }, 22 function (clientPage) { 23 $scope.expiredClientPage = clientPage; 24 } 25 ); 26 }; 27 28 var update = function () { 29 getClients(); 30 getExpiredClients(); 31 }; 32 33 $scope.changeClientsPage = function () { 34 update(); 35 }; 36 37 $scope.changeExpiredClientsPage = function () { 38 update(); 39 }; 40 41 $scope.updateInterval = $interval(update, $scope.interval); 42 var cancelInterval = $scope.$on('$locationChangeSuccess', function () { 43 $interval.cancel($scope.updateInterval); 44 cancelInterval(); 45 }); 46 update(); // init page 47 6 48 }] 7 49 );
Note: See TracChangeset
for help on using the changeset viewer.