Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/19/15 18:06:19 (9 years ago)
Author:
dglaser
Message:

#2388: Updated Hive, DataAccess and WebApp

HeuristicLab.Services.Hive.DataAccess:

  • Updated database statistics schema

HeuristicLab.Services.Hive:

  • Fixed event flag in HiveJanitor Service
  • Improved UpdateTaskFactsTable in the HiveStatisticsGenerator

HeuristicLab.Services.WebApp:

  • Updated Statistics DataController to match the new statistics schema
Location:
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataController.cs

    r12477 r12484  
    4141      get { return ServiceLocator.Instance.UserManager; }
    4242    }
     43    private IRoleVerifier RoleVerifier {
     44      get { return ServiceLocator.Instance.RoleVerifier; }
     45    }
     46    private IAuthorizationManager AuthorizationManager {
     47      get { return ServiceLocator.Instance.AuthorizationManager; }
     48    }
    4349
    4450    public IEnumerable<DTO.Job> GetJobs() {
     
    4753
    4854    public IEnumerable<DTO.Job> GetJobsByUserId(Guid id) {
     55      if (id != UserManager.CurrentUserId) {
     56        RoleVerifier.AuthenticateForAnyRole(HiveRoles.Administrator);
     57      }
    4958      using (var pm = PersistenceManager) {
    5059        return pm.UseTransaction(() => {
     
    6271      using (var pm = PersistenceManager) {
    6372        return pm.UseTransaction(() => {
     73          var dimJobDao = pm.JobDao;
    6474          var factTaskDao = pm.FactTaskDao;
     75          var job = dimJobDao.GetById(id);
     76          if (job != null && job.OwnerUserId != UserManager.CurrentUserId) {
     77            RoleVerifier.AuthenticateForAllRoles(HiveRoles.Administrator);
     78          }
    6579          return factTaskDao.GetByJobId(id).Select(x => new DTO.Task {
    66             TotalRuntime = x.TotalRuntime,
    67             TotalWaitingTime = x.TotalWaitingTime,
    68             TotalTransferTime = x.TotalTransferTime,
     80            Id = x.TaskId,
     81            CalculatingTime = x.CalculatingTime,
     82            WaitingTime = x.WaitingTime,
     83            TransferTime = x.TransferTime,
     84            InitialWaitingTime = x.InitialWaitingTime,
    6985            NumCalculationRuns = x.NumCalculationRuns,
    7086            NumRetries = x.NumRetries,
     
    7288            MemoryRequired = x.MemoryRequired,
    7389            Priority = x.Priority,
     90            State = x.TaskState.ToString(),
    7491            LastClientId = x.LastClientId,
    7592            StartTime = x.StartTime,
    76             EndTime = x.EndTime
     93            EndTime = x.EndTime,
     94            Exception = x.Exception
    7795          }).ToList();
    7896        });
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Task.cs

    r12477 r12484  
    2424namespace HeuristicLab.Services.WebApp.Statistics.WebApi.DataTransfer {
    2525  public class Task {
    26     public double TotalRuntime { get; set; }
    27     public double TotalWaitingTime { get; set; }
    28     public double TotalTransferTime { get; set; }
     26    public Guid Id { get; set; }
     27    public double CalculatingTime { get; set; }
     28    public double WaitingTime { get; set; }
     29    public double TransferTime { get; set; }
     30    public double InitialWaitingTime { get; set; }
    2931    public int NumCalculationRuns { get; set; }
    3032    public int NumRetries { get; set; }
     
    3234    public int MemoryRequired { get; set; }
    3335    public int Priority { get; set; }
     36    public string State { get; set; }
    3437    public Guid? LastClientId { get; set; }
    35     public DateTime StartTime { get; set; }
     38    public DateTime? StartTime { get; set; }
    3639    public DateTime? EndTime { get; set; }
     40    public string Exception { get; set; }
    3741  }
    3842}
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobs.cshtml

    r12477 r12484  
    2727                </div>
    2828                <div class="panel-body">
    29                     <table class="table table-hover">
     29                    <table class="table table-hover table-condensed">
    3030                        <thead>
    31                         <tr>
    32                             <th>#</th>
    33                             <th>Job Name</th>
    34                             <th>Date Created</th>
    35                         </tr>
     31                            <tr>
     32                                <th>#</th>
     33                                <th>Job Name</th>
     34                                <th>Date Created</th>
     35                                <th></th>
     36                            </tr>
    3637                        </thead>
    3738                        <tr ng-repeat="job in jobs">
     
    3940                            <td>{{job.Name}}</td>
    4041                            <td>{{job.DateCreated}}</td>
     42                            <td><a ng-href="" data-ng-click="getTasksByJobId(job.Id)">Load Tasks</a></td>
    4143                        </tr>
    4244                        <tr ng-hide="jobs.length">
     
    4951    </div>
    5052
     53    <div class="row" ng-show="tasks.length">
     54
     55        <div class="col-lg-3 col-md-6" ng-repeat="task in tasks">
     56            <div class="panel panel-default">
     57
     58                <div class="panel-heading">
     59                    <h3 class="panel-title">Task {{$index + 1}}</h3>
     60                </div>
     61                <div class="panel-body">
     62                    <table class="table table-hover table-condensed table-no-border table-auto-width">
     63                        <tr>
     64                            <td>Initial Waiting Time:</td>
     65                            <td>{{task.InitialWaitingTime}}</td>
     66                        </tr>
     67                        <tr>
     68                            <td>Waiting Time:</td>
     69                            <td>{{task.WaitingTime}}</td>
     70                        </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>
     106                        </tr>
     107                    </table>
     108                </div>
     109
     110            </div>
     111        </div>
     112    </div>
    51113</div>
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobsCtrl.js

    r12477 r12484  
    88                });
    99            };
     10
     11            $scope.getTasksByJobId = function(id) {
     12                statisticsService.getTasksByJobId({ id: id }, function(tasks) {
     13                    $scope.tasks = tasks;
     14                });
     15            };
     16
    1017            getJobs();
    1118        }]
Note: See TracChangeset for help on using the changeset viewer.