- Timestamp:
- 07/03/15 16:35:17 (9 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/HeuristicLab.Services.WebApp.Statistics-3.3.csproj
r12560 r12584 150 150 <Compile Include="WebApi\DataTransfer\GroupDetails.cs" /> 151 151 <Compile Include="WebApi\DataTransfer\GroupPage.cs" /> 152 <Compile Include="WebApi\DataTransfer\Integer.cs" />153 152 <Compile Include="WebApi\DataTransfer\Job.cs" /> 154 153 <Compile Include="WebApi\DataTransfer\JobDetails.cs" /> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/ClientController.cs
r12562 r12584 27 27 using HeuristicLab.Services.Hive.DataAccess; 28 28 using HeuristicLab.Services.Hive.DataAccess.Interfaces; 29 using HeuristicLab.Services.WebApp.Status.WebApi;30 29 using DT = HeuristicLab.Services.WebApp.Statistics.WebApi.DataTransfer; 31 30 … … 106 105 Name = x.DimJob.UserName 107 106 }) 108 .Distinct().ToList() 107 .Distinct() 108 .ToList() 109 109 }) 110 110 .FirstOrDefault(); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/JavascriptUtils.cs
r12562 r12584 22 22 using System; 23 23 24 namespace HeuristicLab.Services.WebApp.Stat us.WebApi {24 namespace HeuristicLab.Services.WebApp.Statistics.WebApi { 25 25 public static class JavascriptUtils { 26 26 public static long ToTimestamp(DateTime input) { -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/TaskController.cs
r12562 r12584 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.IO; 24 25 using System.Linq; 26 using System.Net; 27 using System.Net.Http; 28 using System.Net.Http.Headers; 25 29 using System.Web.Http; 26 30 using HeuristicLab.Services.Access; … … 153 157 } 154 158 } 159 160 public HttpResponseMessage GetTaskDataById(Guid id) { 161 using (var pm = PersistenceManager) { 162 var taskDataDao = pm.TaskDataDao; 163 return pm.UseTransaction(() => { 164 var taskData = taskDataDao.GetById(id); 165 if (taskData == null) 166 return new HttpResponseMessage(HttpStatusCode.NotFound); 167 HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK); 168 var stream = new MemoryStream(taskData.Data); 169 result.Content = new StreamContent(stream); 170 result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); 171 result.Content.Headers.ContentDisposition = 172 new ContentDispositionHeaderValue("attachment") { 173 FileName = string.Format("{0}.hl", id) 174 }; 175 return result; 176 }); 177 } 178 } 155 179 } 156 180 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clients.cshtml
r12551 r12584 6 6 <a ng-href="#/statistics/jobs">Jobs</a> 7 7 </li> 8 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) 9 { 8 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) { 10 9 <li> 11 10 <a ng-href="#/statistics/users">Users</a> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/details/clientDetails.cshtml
r12551 r12584 236 236 <div class="panel-body"> 237 237 <table class="table table-condensed table-no-border table-auto-width"> 238 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) 239 { 238 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) { 240 239 <tr> 241 240 <td colspan="2"><span data-fittext="0.99">{{task.Id}}</span></td> … … 256 255 <td class="text-right">{{task.CalculatingTime | toTimespan}}</td> 257 256 </tr> 258 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) 259 { 257 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) { 260 258 <tr> 261 259 <td>User:</td> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/details/clientDetailsCtrl.js
r12551 r12584 100 100 $scope.curUserId = id; 101 101 $scope.curUserName = name; 102 $scope.curTaskPage = 1; 102 103 getClientDetails(); 103 104 }; -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/details/clientTaskDetailsDialogCtrl.js
r12516 r12584 5 5 $scope.taskNo = taskNo; 6 6 $scope.task = task; 7 8 7 $scope.close = function () { 9 8 $modalInstance.dismiss('cancel'); 10 9 }; 11 12 10 }] 13 11 ); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/details/jobTaskDetailsDialogCtrl.js
r12516 r12584 5 5 $scope.taskNo = taskNo; 6 6 $scope.task = task; 7 8 7 $scope.close = function () { 9 8 $modalInstance.dismiss('cancel'); 10 9 }; 11 12 10 }] 13 11 ); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobsCtrl.js
r12551 r12584 42 42 }; 43 43 44 45 44 $scope.updateInterval = $interval(update, $scope.interval); 46 45 var cancelInterval = $scope.$on('$locationChangeSuccess', function () { -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/details/userDetails.cshtml
r12551 r12584 16 16 <a ng-href="#/statistics/groups">Groups</a> 17 17 </li> 18 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) { 19 <li> 20 <a ng-href="#/statistics/exceptions">Exceptions</a> 21 </li> 22 } 18 <li> 19 <a ng-href="#/statistics/exceptions">Exceptions</a> 20 </li> 23 21 </ul> 24 22 </header> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/details/userDetailsCtrl.js
r12551 r12584 7 7 $scope.completedJobCurPage = 1; 8 8 $scope.completedJobPageSize = 20; 9 10 9 11 10 var getUserDetails = function () { -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/users.cshtml
r12551 r12584 16 16 <a ng-href="#/statistics/groups">Groups</a> 17 17 </li> 18 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) { 19 <li> 20 <a ng-href="#/statistics/exceptions">Exceptions</a> 21 </li> 22 } 18 <li> 19 <a ng-href="#/statistics/exceptions">Exceptions</a> 20 </li> 23 21 </ul> 24 22 </header>
Note: See TracChangeset
for help on using the changeset viewer.