Changeset 12516 for branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp
- Timestamp:
- 06/25/15 18:34:40 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 17 added
- 10 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 ); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobs.cshtml
r12484 r12516 10 10 <a ng-href="#/statistics/users">Users</a> 11 11 </li> 12 <li>13 <a ng-href="#/statistics/clients">Clients</a>14 </li>15 12 } 13 <li> 14 <a ng-href="#/statistics/clients">Clients</a> 15 </li> 16 16 </ul> 17 17 </header> 18 18 19 19 <div class="default-view-container"> 20 21 22 20 <div class="row"> 23 21 <div class="col-lg-12"> 24 22 <div class="panel panel-default"> 25 23 <div class="panel-heading"> 26 <h3 class="panel-title"> MyJobs</h3>24 <h3 class="panel-title">Current Jobs</h3> 27 25 </div> 28 26 <div class="panel-body"> 29 27 <table class="table table-hover table-condensed"> 30 28 <thead> 31 <tr> 32 <th>#</th> 33 <th>Job Name</th> 34 <th>Date Created</th> 35 <th></th> 36 </tr> 29 <tr> 30 <th>#</th> 31 <th>Job Name</th> 32 <th>Date Created</th> 33 <th>Progress</th> 34 <th></th> 35 </tr> 37 36 </thead> 38 37 <tr ng-repeat="job in jobs"> … … 40 39 <td>{{job.Name}}</td> 41 40 <td>{{job.DateCreated}}</td> 42 <td><a ng-href="" data-ng-click="getTasksByJobId(job.Id)">Load Tasks</a></td> 41 <td> 42 <progressbar class="progress active" max="job.TotalTasks" value="job.CompletedTasks" type="success"><i style="color:black; white-space:nowrap;">{{job.CompletedTasks}} / {{job.TotalTasks}}</i></progressbar> 43 </td> 44 <td> 45 <a ng-href="#/statistics/jobs/{{job.Id}}">Details</a> 46 </td> 43 47 </tr> 44 48 <tr ng-hide="jobs.length"> 45 <td colspan=" 4" class="text-center">Nojobs found!</td>49 <td colspan="5" class="text-center">No active jobs found!</td> 46 50 </tr> 47 51 </table> … … 51 55 </div> 52 56 53 <div class="row" ng-show="tasks.length"> 54 55 <div class="col-lg-3 col-md-6" ng-repeat="task in tasks"> 57 <div class="row"> 58 <div class="col-lg-12"> 56 59 <div class="panel panel-default"> 57 58 60 <div class="panel-heading"> 59 <h3 class="panel-title"> Task {{$index + 1}}</h3>61 <h3 class="panel-title">Completed Jobs</h3> 60 62 </div> 61 63 <div class="panel-body"> 62 <table class="table table-hover table-condensed table-no-border table-auto-width"> 64 <table class="table table-hover table-condensed"> 65 <thead> 63 66 <tr> 64 <td>Initial Waiting Time:</td> 65 <td>{{task.InitialWaitingTime}}</td> 67 <th>#</th> 68 <th>Job Name</th> 69 <th>Date Created</th> 70 <th>Date Completed</th> 71 <th>Tasks</th> 72 <th></th> 66 73 </tr> 67 <tr> 68 <td>Waiting Time:</td> 69 <td>{{task.WaitingTime}}</td> 74 </thead> 75 <tr ng-repeat="job in completedJobPage.Jobs"> 76 <td>{{($index + 1)+((completedJobCurPage-1)*(completedJobPageSize))}}</td> 77 <td>{{job.Name}}</td> 78 <td>{{job.DateCreated}}</td> 79 <td>{{job.DateCompleted}}</td> 80 <td>{{job.TotalTasks}}</td> 81 <td><a ng-href="#/statistics/jobs/{{job.Id}}">Details</a></td> 70 82 </tr> 71 <tr> 72 <td>Calculating Time:</td> 73 <td>{{task.CalculatingTime}}</td> 74 </tr> 75 <tr> 76 <td>Transfer Time:</td> 77 <td>{{task.TransferTime}}</td> 78 </tr> 79 <tr> 80 <td>Start Time:</td> 81 <td>{{task.StartTime}}</td> 82 </tr> 83 <tr> 84 <td>End Time:</td> 85 <td>{{task.EndTime}}</td> 86 </tr> 87 <tr> 88 <td>Calculation Runs:</td> 89 <td>{{task.NumCalculationRuns}}</td> 90 </tr> 91 <tr> 92 <td>Retries Runs:</td> 93 <td>{{task.NumRetries}}</td> 94 </tr> 95 <tr> 96 <td>Cores Required:</td> 97 <td>{{task.CoresRequired}}</td> 98 </tr> 99 <tr> 100 <td>Memory Required:</td> 101 <td>{{task.MemoryRequired}}</td> 102 </tr> 103 <tr> 104 <td>Priority:</td> 105 <td>{{task.Priority}}</td> 83 <tr ng-hide="completedJobPage.Jobs.length"> 84 <td colspan="6" class="text-center">No completed jobs found!</td> 106 85 </tr> 107 86 </table> 87 <div class="row text-center" ng-show="completedJobPage.TotalJobs > completedJobPage.Jobs.length"> 88 <pagination max-size="10" total-items="completedJobPage.TotalJobs" 89 ng-model="completedJobCurPage" items-per-page="completedJobPageSize" 90 ng-change="changeCompletedJobPage()" 91 boundary-links="true" rotate="false" num-pages="numPages"></pagination> 92 </div> 108 93 </div> 109 110 94 </div> 111 95 </div> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobsCtrl.js
r12484 r12516 2 2 var module = appStatisticsPlugin.getAngularModule(); 3 3 module.controller('app.statistics.jobsCtrl', 4 ['$scope', 'app.statistics.data.service', function($scope, statisticsService) { 5 var getJobs = function() { 6 statisticsService.getJobs({}, function(jobs) { 4 ['$scope', '$interval', 'app.statistics.jobService', function ($scope, $interval, jobService) { 5 $scope.interval = defaultPageUpdateInterval; 6 $scope.completedJobCurPage = 1; 7 $scope.completedJobPageSize = 20; 8 9 var getAllJobs = function() { 10 jobService.getAllJobs({ completed: false }, function(jobs) { 7 11 $scope.jobs = jobs; 12 var length = $scope.jobs.length; 13 for (var i = 0; i < length; ++i) { 14 $scope.jobs[i].DateCreated = CSharpDateToString($scope.jobs[i].DateCreated); 15 } 8 16 }); 9 17 }; 10 18 11 $scope.getTasksByJobId = function(id) { 12 statisticsService.getTasksByJobId({ id: id }, function(tasks) { 13 $scope.tasks = tasks; 14 }); 19 var getCompletedJobs = function() { 20 jobService.getJobs({ page: $scope.completedJobCurPage, size: $scope.completedJobPageSize, completed: true }, 21 function (jobPage) { 22 $scope.completedJobPage = jobPage; 23 var length = $scope.completedJobPage.Jobs.length; 24 for (var i = 0; i < length; ++i) { 25 $scope.completedJobPage.Jobs[i].DateCreated = CSharpDateToString($scope.completedJobPage.Jobs[i].DateCreated); 26 $scope.completedJobPage.Jobs[i].DateCompleted = CSharpDateToString($scope.completedJobPage.Jobs[i].DateCompleted); 27 } 28 } 29 ); 15 30 }; 16 31 17 getJobs(); 32 $scope.changeCompletedJobPage = function () { 33 update(); 34 }; 35 36 var update = function () { 37 getAllJobs(); 38 getCompletedJobs(); 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 18 47 }] 19 48 ); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/services/statisticsService.js
r12477 r12516 4 4 module.factory('app.statistics.data.service', 5 5 ['$resource', function ($resource) { 6 return $resource(apiUrl + ':action', { id: '@id' }, { 6 return $resource(apiUrl + ':action', { id: '@id', page: '@page', size: '@size', states: '@states', expired: '@expired'}, { 7 getJob: { method: 'GET', params: { action: 'GetJob' } }, 7 8 getJobs: { method: 'GET', params: { action: 'GetJobs' }, isArray: true }, 9 getCompletedJobs: { method: 'GET', params: { action: 'GetCompletedJobs' }, isArray: true }, 10 getCompletedJobsByUserId: { method: 'GET', params: { action: 'GetCompletedJobsByUserId' }, isArray: true }, 11 getCompletedJobsCount: { method: 'GET', params: { action: 'GetCompletedJobsCount' } }, 12 getCompletedJobsCountByUserId: { method: 'GET', params: { action: 'GetCompletedJobsCountByUserId' } }, 8 13 getJobsByUserId: { method: 'GET', params: { action: 'GetJobsByUserId' }, isArray: true }, 9 getTasksByJobId: { method: 'GET', params: { action: 'GetTasksByJobId' }, isArray: true } 14 getTaskCountByJobId: { method: 'GET', params: { action: 'GetTaskCountByJobId' } }, 15 getTasksByJobId: { method: 'GET', params: { action: 'GetTasksByJobId' }, isArray: true }, 16 getJobTasksStatesByJobId: { method: 'GET', params: { action: 'GetJobTasksStatesByJobId' }, isArray: true }, 17 getClient: { method: 'GET', params: { action: 'GetClient' } }, 18 getClientCount: { method: 'GET', params: { action: 'GetClientCount' } }, 19 getClients: { method: 'GET', params: { action: 'GetClients' }, isArray: true }, 20 getTaskCountByClientId: { method: 'GET', params: { action: 'GetTaskCountByClientId' } }, 21 getTasksByClientId: { method: 'GET', params: { action: 'GetTasksByClientId' }, isArray: true }, 22 getJobTasksStatesByClientId: { method: 'GET', params: { action: 'GetJobTasksStatesByClientId' }, isArray: true }, 23 getClientHistory: { method: 'GET', params: { action: 'GetClientHistory' }, isArray: true }, 24 getUsers: { method: 'GET', params: { action: 'GetUsers' }, isArray: true }, 25 getUser: { method: 'GET', params: { action: 'GetUser' } } 10 26 }); 11 27 }] -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/statistics.css
r12477 r12516 1 1 #job-filter-header { 2 padding: 30px; 3 background: #F5F5F5; 4 border-top: 1px solid #D3D3D3; 5 border-bottom: 1px solid #D3D3D3; 6 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/users.cshtml
r12477 r12516 17 17 18 18 <div class="default-view-container"> 19 19 <div class="row"> 20 <div class="col-lg-12"> 21 <div class="panel panel-default"> 22 <div class="panel-heading"> 23 <h3 class="panel-title">Users</h3> 24 </div> 25 <div class="panel-body"> 26 <table class="table table-hover table-condensed"> 27 <thead> 28 <tr> 29 <th>#</th> 30 <th>Username</th> 31 <th></th> 32 </tr> 33 </thead> 34 <tr ng-repeat="user in users"> 35 <td>{{$index + 1}}</td> 36 <td>{{user.Name}}</td> 37 <td> 38 <a ng-href="#/statistics/users/{{user.Id}}">Details</a> 39 </td> 40 </tr> 41 <tr ng-hide="users.length"> 42 <td colspan="4" class="text-center">No users found!</td> 43 </tr> 44 </table> 45 </div> 46 </div> 47 </div> 48 </div> 20 49 </div> 21 50 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/usersCtrl.js
r12477 r12516 2 2 var module = appStatisticsPlugin.getAngularModule(); 3 3 module.controller('app.statistics.usersCtrl', 4 ['$scope', 'app.statistics.data.service', function($scope, statisticsService) { 5 4 ['$scope', '$interval', 'app.statistics.userService', function ($scope, $interval, userService) { 5 $scope.interval = defaultPageUpdateInterval; 6 7 var getUsers = function() { 8 userService.getUsers({}, function(users) { 9 users.splice(0, 1); 10 $scope.users = users; 11 }); 12 }; 13 14 $scope.updateInterval = $interval(getUsers, $scope.interval); 15 var cancelInterval = $scope.$on('$locationChangeSuccess', function () { 16 $interval.cancel($scope.updateInterval); 17 cancelInterval(); 18 }); 19 getUsers(); // init page 6 20 }] 7 21 );
Note: See TracChangeset
for help on using the changeset viewer.