Changeset 12525 for branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs
- Timestamp:
- 06/26/15 18:02:03 (10 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/details/jobDetails.cshtml
r12516 r12525 13 13 <li> 14 14 <a ng-href="#/statistics/clients">Clients</a> 15 </li> 16 <li> 17 <a ng-href="#/statistics/groups">Groups</a> 15 18 </li> 16 19 </ul> … … 97 100 <div class="col-md-2"></div> 98 101 </div> 99 </div>102 </div> 100 103 101 104 </div> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/details/jobDetailsCtrl.js
r12516 r12525 14 14 if (isDefined($scope.job.DateCompleted)) { 15 15 $scope.job.DateCompleted = CSharpDateToString($scope.job.DateCompleted); 16 } else { 17 $scope.job.DateCompleted = 'Not completed yet'; 16 18 } 17 19 $scope.job.CalculatingWaitingRatio = ($scope.job.TotalCalculatingTime / $scope.job.TotalWaitingTime); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobs.cshtml
r12516 r12525 13 13 <li> 14 14 <a ng-href="#/statistics/clients">Clients</a> 15 </li> 16 <li> 17 <a ng-href="#/statistics/groups">Groups</a> 15 18 </li> 16 19 </ul> … … 54 57 </div> 55 58 </div> 56 59 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) { 60 <div class="row"> 61 <div class="col-lg-12"> 62 <div class="panel panel-default"> 63 <div class="panel-heading"> 64 <h3 class="panel-title">Current Active Jobs</h3> 65 </div> 66 <div class="panel-body"> 67 <table class="table table-hover table-condensed"> 68 <thead> 69 <tr> 70 <th>#</th> 71 <th>Job Name</th> 72 <th>User Name</th> 73 <th>Date Created</th> 74 <th>Progress</th> 75 <th></th> 76 </tr> 77 </thead> 78 <tr ng-repeat="job in allUsersJobs"> 79 <td>{{$index + 1}}</td> 80 <td>{{job.Name}}</td> 81 <td> 82 <a ng-href="#/statistics/users/{{job.UserId}}" ng-show="job.UserName">{{job.UserName}}</a> 83 </td> 84 <td>{{job.DateCreated}}</td> 85 <td> 86 <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> 87 </td> 88 <td> 89 <a ng-href="#/statistics/jobs/{{job.Id}}">Details</a> 90 </td> 91 </tr> 92 <tr ng-hide="allUsersJobs.length"> 93 <td colspan="6" class="text-center">No active jobs found!</td> 94 </tr> 95 </table> 96 </div> 97 </div> 98 </div> 99 </div> 100 } 57 101 <div class="row"> 58 102 <div class="col-lg-12"> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobsCtrl.js
r12516 r12525 3 3 module.controller('app.statistics.jobsCtrl', 4 4 ['$scope', '$interval', 'app.statistics.jobService', function ($scope, $interval, jobService) { 5 var first = true; 6 $scope.isAdministrator = false; 5 7 $scope.interval = defaultPageUpdateInterval; 6 8 $scope.completedJobCurPage = 1; … … 30 32 }; 31 33 34 var getAllActiveJobsFromAllUsers = function () { 35 jobService.getAllActiveJobsFromAllUsers({}, function (jobs) { 36 $scope.isAdministrator = true; 37 $scope.allUsersJobs = jobs; 38 var length = $scope.allUsersJobs.length; 39 for (var i = 0; i < length; ++i) { 40 $scope.allUsersJobs[i].DateCreated = CSharpDateToString($scope.allUsersJobs[i].DateCreated); 41 } 42 }); 43 }; 44 32 45 $scope.changeCompletedJobPage = function () { 33 46 update(); … … 36 49 var update = function () { 37 50 getAllJobs(); 51 if (first || $scope.isAdministrator) { 52 getAllActiveJobsFromAllUsers(); 53 } 38 54 getCompletedJobs(); 39 55 }; 56 40 57 41 58 $scope.updateInterval = $interval(update, $scope.interval); … … 45 62 }); 46 63 update(); // init page 64 first = false; 47 65 }] 48 66 );
Note: See TracChangeset
for help on using the changeset viewer.