Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/19/15 18:06:19 (10 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/WebApi
Files:
2 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}
Note: See TracChangeset for help on using the changeset viewer.