- Timestamp:
- 06/25/15 18:34:40 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 30 added
- 1 deleted
- 15 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/HeuristicLab.Services.WebApp.Statistics-3.3.csproj
r12477 r12516 140 140 </ItemGroup> 141 141 <ItemGroup> 142 <Compile Include="WebApi\ DataController.cs" />142 <Compile Include="WebApi\ClientController.cs" /> 143 143 <Compile Include="Properties\AssemblyInfo.cs" /> 144 144 <Compile Include="WebApi\DataTransfer\Client.cs" /> 145 <Compile Include="WebApi\DataTransfer\ClientDetails.cs" /> 146 <Compile Include="WebApi\DataTransfer\ClientPage.cs" /> 147 <Compile Include="WebApi\DataTransfer\ClientStatus.cs" /> 148 <Compile Include="WebApi\DataTransfer\Integer.cs" /> 145 149 <Compile Include="WebApi\DataTransfer\Job.cs" /> 150 <Compile Include="WebApi\DataTransfer\JobDetails.cs" /> 151 <Compile Include="WebApi\DataTransfer\JobPage.cs" /> 146 152 <Compile Include="WebApi\DataTransfer\Task.cs" /> 153 <Compile Include="WebApi\DataTransfer\TaskPage.cs" /> 154 <Compile Include="WebApi\DataTransfer\TaskStateCount.cs" /> 147 155 <Compile Include="WebApi\DataTransfer\User.cs" /> 156 <Compile Include="WebApi\JavascriptUtils.cs" /> 157 <Compile Include="WebApi\JobController.cs" /> 158 <Compile Include="WebApi\TaskController.cs" /> 159 <Compile Include="WebApi\UserController.cs" /> 148 160 </ItemGroup> 149 161 <ItemGroup> … … 151 163 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 152 164 </Content> 165 <Content Include="WebApp\clients\details\clientDetailsCtrl.js"> 166 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 167 </Content> 153 168 <Content Include="WebApp\clients\clientsCtrl.js"> 154 169 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 155 170 </Content> 171 <Content Include="WebApp\clients\details\clientTaskDetailsDialogCtrl.js"> 172 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 173 </Content> 174 <Content Include="WebApp\jobs\details\jobDetailsCtrl.js"> 175 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 176 </Content> 177 <Content Include="WebApp\jobs\details\jobTaskDetailsDialogCtrl.js"> 178 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 179 </Content> 156 180 <Content Include="WebApp\jobs\jobsCtrl.js"> 157 181 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 158 182 </Content> 183 <Content Include="WebApp\services\clientService.js"> 184 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 185 </Content> 186 <Content Include="WebApp\services\jobService.js"> 187 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 188 </Content> 159 189 <Content Include="WebApp\services\statisticsService.js"> 160 190 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 161 191 </Content> 192 <Content Include="WebApp\services\taskService.js"> 193 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 194 </Content> 195 <Content Include="WebApp\services\userService.js"> 196 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 197 </Content> 162 198 <Content Include="WebApp\statistics.css"> 199 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 200 </Content> 201 <Content Include="WebApp\users\details\userDetailsCtrl.js"> 163 202 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 164 203 </Content> … … 179 218 </Content> 180 219 <Content Include="WebApp\users\users.cshtml"> 220 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 221 </Content> 222 <None Include="WebApp\clients\details\clientDetails.cshtml"> 223 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 224 </None> 225 <None Include="WebApp\clients\details\clientTaskDetailsDialog.cshtml"> 226 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 227 </None> 228 <None Include="WebApp\jobs\details\jobDetails.cshtml"> 229 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 230 </None> 231 <None Include="WebApp\jobs\details\jobTaskDetailsDialog.cshtml"> 232 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 233 </None> 234 <Content Include="WebApp\users\details\userDetails.cshtml"> 181 235 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 182 236 </Content> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Client.cs
r12477 r12516 26 26 public Guid Id { get; set; } 27 27 public string Name { get; set; } 28 public int TotalCores { get; set; } 29 public int UsedCores { get; set; } 30 public int TotalMemory { get; set; } 31 public int UsedMemory { get; set; } 32 public double CpuUtilization { get; set; } 33 public string State { get; set; } 34 public DateTime LastUpdate { get; set; } 28 35 } 29 36 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Job.cs
r12477 r12516 26 26 public Guid Id { get; set; } 27 27 public string Name { get; set; } 28 public Guid UserId { get; set; } 29 public string UserName { get; set; } 28 30 public DateTime DateCreated { get; set; } 31 public int TotalTasks { get; set; } 32 public int CompletedTasks { get; set; } 33 public DateTime? DateCompleted { get; set; } 29 34 } 30 35 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Task.cs
r12484 r12516 25 25 public class Task { 26 26 public Guid Id { get; set; } 27 public Guid JobId { get; set; } 28 public string JobName { get; set; } 29 public long TotalTime { get; set; } 27 30 public double CalculatingTime { get; set; } 28 31 public double WaitingTime { get; set; } … … 36 39 public string State { get; set; } 37 40 public Guid? LastClientId { get; set; } 41 public string LastClientName { get; set; } 42 public Guid UserId { get; set; } 43 public string UserName { get; set; } 38 44 public DateTime? StartTime { get; set; } 39 45 public DateTime? EndTime { get; set; } -
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 ); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/statistics.js
r12477 r12516 2 2 (function () { 3 3 var plugin = appStatisticsPlugin; 4 plugin.dependencies = ['ngResource', 'ui.knob', 'ui.bootstrap' ];4 plugin.dependencies = ['ngResource', 'ui.knob', 'ui.bootstrap', 'ngFitText']; 5 5 plugin.files = [ 6 'WebApp/statistics.css', 6 7 'WebApp/services/statisticsService.js', 8 'WebApp/services/jobService.js', 9 'WebApp/services/taskService.js', 10 'WebApp/services/userService.js', 11 'WebApp/services/clientService.js', 7 12 'WebApp/jobs/jobsCtrl.js', 13 'WebApp/jobs/details/jobDetailsCtrl.js', 14 'WebApp/jobs/details/jobTaskDetailsDialogCtrl.js', 8 15 'WebApp/clients/clientsCtrl.js', 16 'WebApp/clients/details/clientDetailsCtrl.js', 17 'WebApp/clients/details/clientTaskDetailsDialogCtrl.js', 9 18 'WebApp/users/usersCtrl.js', 19 'WebApp/users/details/userDetailsCtrl.js' 10 20 ]; 11 21 plugin.view = 'WebApp/jobs/jobs.cshtml'; … … 13 23 plugin.routes = [ 14 24 new Route('jobs', 'WebApp/jobs/jobs.cshtml', 'app.statistics.jobsCtrl'), 25 new Route('jobs/:id', 'WebApp/jobs/details/jobDetails.cshtml', 'app.statistics.jobDetailsCtrl'), 15 26 new Route('clients', 'WebApp/clients/clients.cshtml', 'app.statistics.clientsCtrl'), 16 new Route('users', 'WebApp/users/users.cshtml', 'app.statistics.usersCtrl') 27 new Route('clients/:id', 'WebApp/clients/details/clientDetails.cshtml', 'app.statistics.clientDetailsCtrl'), 28 new Route('users', 'WebApp/users/users.cshtml', 'app.statistics.usersCtrl'), 29 new Route('users/:id', 'WebApp/users/details/userDetails.cshtml', 'app.statistics.userDetailsCtrl') 17 30 ]; 18 31 var menu = app.getMenu();
Note: See TracChangeset
for help on using the changeset viewer.