Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12516


Ignore:
Timestamp:
06/25/15 18:34:40 (9 years ago)
Author:
dglaser
Message:

#2388:

HeuristicLab.Services.Hive.DataAccess-3.3:

  • updated daos
  • changed statistics database schema
  • updated HiveStatisticsGenerator

HeuristicLab.Services.WebApp.Statistics-3.3:

  • added jobs, client and user page
Location:
branches/HiveStatistics/sources
Files:
30 added
1 deleted
30 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources

  • branches/HiveStatistics/sources/HeuristicLab 3.3 Services.sln

    r12477 r12516  
    4949Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Hive.JanitorService-3.3", "HeuristicLab.Services.Hive.JanitorService\3.3\HeuristicLab.Services.Hive.JanitorService-3.3.csproj", "{F685556B-F6EB-4143-8E7E-662D00FDD299}"
    5050EndProject
    51 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.GeoIP", "HeuristicLab.GeoIP\1.12\HeuristicLab.GeoIP.csproj", "{BE9B0229-9150-49A4-AEA6-BB58E055992F}"
    52 EndProject
    5351Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Access.DataAccess-3.3", "HeuristicLab.Services.Access.DataAccess\3.3\HeuristicLab.Services.Access.DataAccess-3.3.csproj", "{0F652437-998A-4EAB-8BF1-444B5FE8CE97}"
    5452EndProject
     
    6967    .nuget\NuGet.targets = .nuget\NuGet.targets
    7068  EndProjectSection
     69EndProject
     70Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.GeoIP", "HeuristicLab.ExtLibs\HeuristicLab.GeoIP\1.12\HeuristicLab.GeoIP.csproj", "{BE9B0229-9150-49A4-AEA6-BB58E055992F}"
    7171EndProject
    7272Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.WebApp.Statistics-3.3", "HeuristicLab.Services.WebApp.Statistics\3.3\HeuristicLab.Services.WebApp.Statistics-3.3.csproj", "{1BC54353-7D4C-4734-BAA9-3D11B3242B59}"
     
    161161    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|x86.ActiveCfg = Release|x86
    162162    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|x86.Build.0 = Release|x86
    163     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    164     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Any CPU.Build.0 = Debug|Any CPU
    165     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x64.ActiveCfg = Release|x64
    166     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x64.Build.0 = Release|x64
    167     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x86.ActiveCfg = Release|x86
    168     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x86.Build.0 = Release|x86
    169     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Any CPU.ActiveCfg = Release|Any CPU
    170     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Any CPU.Build.0 = Release|Any CPU
    171     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x64.ActiveCfg = Release|x64
    172     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x64.Build.0 = Release|x64
    173     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x86.ActiveCfg = Release|x86
    174     {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x86.Build.0 = Release|x86
    175163    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    176164    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|Any CPU.Build.0 = Debug|Any CPU
     
    245233    {2351DBE7-D0E1-44F9-9CE9-2F0F5E580572}.Release|x86.ActiveCfg = Release|x86
    246234    {2351DBE7-D0E1-44F9-9CE9-2F0F5E580572}.Release|x86.Build.0 = Release|x86
     235    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     236    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Any CPU.Build.0 = Debug|Any CPU
     237    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x64.ActiveCfg = Debug|x64
     238    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x64.Build.0 = Debug|x64
     239    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x86.ActiveCfg = Debug|x86
     240    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x86.Build.0 = Debug|x86
     241    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Any CPU.ActiveCfg = Release|Any CPU
     242    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Any CPU.Build.0 = Release|Any CPU
     243    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x64.ActiveCfg = Release|x64
     244    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x64.Build.0 = Release|x64
     245    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x86.ActiveCfg = Release|x86
     246    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x86.Build.0 = Release|x86
    247247    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    248248    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|Any CPU.Build.0 = Debug|Any CPU
    249     {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|x64.ActiveCfg = Debug|Any CPU
    250     {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|x86.ActiveCfg = Debug|Any CPU
     249    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|x64.ActiveCfg = Debug|x64
     250    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|x64.Build.0 = Debug|x64
     251    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|x86.ActiveCfg = Debug|x86
     252    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|x86.Build.0 = Debug|x86
    251253    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|Any CPU.ActiveCfg = Release|Any CPU
    252254    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|Any CPU.Build.0 = Release|Any CPU
    253     {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|x64.ActiveCfg = Release|Any CPU
    254     {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|x86.ActiveCfg = Release|Any CPU
     255    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|x64.ActiveCfg = Release|x64
     256    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|x64.Build.0 = Release|x64
     257    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|x86.ActiveCfg = Release|x86
     258    {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|x86.Build.0 = Release|x86
    255259  EndGlobalSection
    256260  GlobalSection(SolutionProperties) = preSolution
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs

    r12468 r12516  
    3737      return Table.SingleOrDefault(x => x.Id == id);
    3838    }
    39     public IQueryable<DimClient> GetRecentlyAddedClients() {
     39    public IQueryable<DimClient> GetActiveClients() {
    4040      return Table.Where(x => x.ExpirationTime == null);
     41    }
     42
     43    public IQueryable<DimClient> GetExpiredClients() {
     44      return Table.Where(x => x.ExpirationTime != null);
    4145    }
    4246
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimJobDao.cs

    r12477 r12516  
    3535      return Table.Where(x => x.UserId == id);
    3636    }
     37
     38    public IQueryable<DimJob> GetNotCompletedJobs() {
     39      return Table.Where(x => x.DateCompleted == null);
     40    }
     41
     42    public IQueryable<DimJob> GetCompletedJobs() {
     43      return Table.Where(x => x.DateCompleted != null);
     44    }
    3745  }
    3846}
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactClientInfoDao.cs

    r12468 r12516  
    5959             };
    6060    }
     61
     62    public IQueryable<FactClientInfo> GetByClientId(Guid id) {
     63      return Table.Where(x => x.ClientId == id);
     64    }
    6165  }
    6266}
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs

    r12477 r12516  
    4444    }
    4545
     46    public DateTime? GetLastCompletedTaskFromJob(Guid id) {
     47      return Table.Where(x => x.JobId == id && x.EndTime != null).Max(x => x.EndTime);
     48    }
     49
     50    public IQueryable<FactTask> GetByClientId(Guid id) {
     51      return Table.Where(x => x.LastClientId == id);
     52    }
     53
    4654    public override void Delete(IEnumerable<Guid> ids) {
    4755      string paramIds = string.Join(",", ids.Select(x => string.Format("'{0}'", x)));
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs

    r12468 r12516  
    3535      return Table.Where(x => !x.IsParentTask);
    3636    }
     37
     38    public IQueryable<Task> GetAllByJobId(Guid id) {
     39      return Table.Where(x => x.JobId == id);
     40    }
    3741  }
    3842}
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r12484 r12516  
    218218      <Column Name="ResourceGroupId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    219219      <Column Name="ResourceGroup2Id" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
     220      <Column Name="GroupName" Type="System.String" CanBeNull="true" />
     221      <Column Name="GroupName2" Type="System.String" CanBeNull="true" />
    220222      <Association Name="DimClient_FactTask" Member="FactTasks" ThisKey="Id" OtherKey="LastClientId" Type="FactTask" />
    221223      <Association Name="DimClient_FactClientInfo" Member="FactClientInfos" ThisKey="Id" OtherKey="ClientId" Type="FactClientInfo" />
     
    250252      <Column Name="JobName" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" />
    251253      <Column Name="UserName" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" />
    252       <Column Name="DateCreated" Type="System.DateTime" CanBeNull="false" />
     254      <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
     255      <Column Name="TotalTasks" Type="System.Int32" DbType="INT NOT NULL" CanBeNull="false" />
     256      <Column Name="CompletedTasks" Type="System.Int32" DbType="INT NOT NULL" CanBeNull="false" />
     257      <Column Name="DateCompleted" Type="System.DateTime" DbType="DateTime NULL" CanBeNull="true" />
    253258      <Association Name="DimJob_FactTask" Member="FactTasks" ThisKey="JobId" OtherKey="JobId" Type="FactTask" />
    254259    </Type>
     
    283288      <Column Name="CpuUtilization" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    284289      <Column Name="TotalTimeIdle" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    285       <Column Name="TotalTimeCalculating" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    286       <Column Name="TotalTimeTransferring" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    287290      <Column Name="TotalTimeOffline" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    288291      <Column Name="TotalTimeUnavailable" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r12484 r12516  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 24.25, 17.5" name="HiveDataContext">
     2<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 24.25, 17.875" name="HiveDataContext">
    33  <DataContextMoniker Name="/HiveDataContext" />
    44  <nestedChildShapes>
     
    247247      </nestedChildShapes>
    248248    </classShape>
    249     <classShape Id="b5b919c2-4efc-4f09-8f52-9d541a11e961" absoluteBounds="4.625, 15.25, 2, 1.9631982421875023">
     249    <classShape Id="b5b919c2-4efc-4f09-8f52-9d541a11e961" absoluteBounds="4.625, 15.25, 2, 2.3478011067708344">
    250250      <DataClassMoniker Name="/HiveDataContext/DimClient" />
    251251      <nestedChildShapes>
    252         <elementListCompartment Id="30f62a7b-0b16-404e-b972-fb12bfe978dd" absoluteBounds="4.6400000000000006, 15.71, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     252        <elementListCompartment Id="30f62a7b-0b16-404e-b972-fb12bfe978dd" absoluteBounds="4.6400000000000006, 15.71, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    253253      </nestedChildShapes>
    254254    </classShape>
     
    259259      </nestedChildShapes>
    260260    </classShape>
    261     <classShape Id="e0cb8641-a75e-4b9f-beda-3218c56938b1" absoluteBounds="8.125, 9.125, 2, 1.7708968098958344">
     261    <classShape Id="e0cb8641-a75e-4b9f-beda-3218c56938b1" absoluteBounds="8.125, 8.25, 2, 2.3478011067708344">
    262262      <DataClassMoniker Name="/HiveDataContext/DimJob" />
    263263      <nestedChildShapes>
    264         <elementListCompartment Id="6b9e8260-7e4b-4357-9c26-eebebfd69504" absoluteBounds="8.14, 9.585, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     264        <elementListCompartment Id="6b9e8260-7e4b-4357-9c26-eebebfd69504" absoluteBounds="8.14, 8.71, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    265265      </nestedChildShapes>
    266266    </classShape>
     
    277277      </nestedChildShapes>
    278278    </classShape>
    279     <classShape Id="053a5cff-b18a-4ee5-8d43-48ed5c5dcfad" absoluteBounds="2.625, 11, 2, 3.5016097005208326">
     279    <classShape Id="053a5cff-b18a-4ee5-8d43-48ed5c5dcfad" absoluteBounds="2.625, 11, 2, 3.1170068359375005">
    280280      <DataClassMoniker Name="/HiveDataContext/FactClientInfo" />
    281281      <nestedChildShapes>
    282         <elementListCompartment Id="0a1cc913-6636-455c-95b3-302f533527db" absoluteBounds="2.6399999999999997, 11.46, 1.9700000000000002, 2.941609700520833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     282        <elementListCompartment Id="0a1cc913-6636-455c-95b3-302f533527db" absoluteBounds="2.6399999999999997, 11.46, 1.9700000000000002, 2.5570068359375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    283283      </nestedChildShapes>
    284284    </classShape>
     
    290290      </nodes>
    291291    </associationConnector>
    292     <associationConnector edgePoints="[(8.5 : 10.8958968098958); (8.5 : 11.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     292    <associationConnector edgePoints="[(8.5 : 10.5978011067708); (8.5 : 11.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    293293      <AssociationMoniker Name="/HiveDataContext/DimJob/DimJob_FactTask" />
    294294      <nodes>
     
    297297      </nodes>
    298298    </associationConnector>
    299     <associationConnector edgePoints="[(5.99218625 : 15.25); (5.99218625 : 12.1788329785157); (4.625 : 12.1788329785157)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     299    <associationConnector edgePoints="[(5.6249975 : 15.25); (5.6249975 : 12.5585034179688); (4.625 : 12.5585034179688)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    300300      <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactClientInfo" />
    301301      <nodes>
     
    311311      </nodes>
    312312    </associationConnector>
    313     <associationConnector edgePoints="[(1.59375 : 10.0689925130208); (1.59375 : 12.7508048502604); (2.625 : 12.7508048502604)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     313    <associationConnector edgePoints="[(1.59375 : 10.0689925130208); (1.59375 : 12.5585034179688); (2.625 : 12.5585034179688)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    314314      <AssociationMoniker Name="/HiveDataContext/DimUser/DimUser_FactClientInfo" />
    315315      <nodes>
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r12484 r12516  
    46194619    private System.Nullable<System.Guid> _ResourceGroup2Id;
    46204620   
     4621    private string _GroupName;
     4622   
     4623    private string _GroupName2;
     4624   
    46214625    private EntitySet<FactTask> _FactTasks;
    46224626   
     
    46394643    partial void OnResourceGroup2IdChanging(System.Nullable<System.Guid> value);
    46404644    partial void OnResourceGroup2IdChanged();
     4645    partial void OnGroupNameChanging(string value);
     4646    partial void OnGroupNameChanged();
     4647    partial void OnGroupName2Changing(string value);
     4648    partial void OnGroupName2Changed();
    46414649    #endregion
    46424650   
     
    47644772          this.SendPropertyChanged("ResourceGroup2Id");
    47654773          this.OnResourceGroup2IdChanged();
     4774        }
     4775      }
     4776    }
     4777   
     4778    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName")]
     4779    public string GroupName
     4780    {
     4781      get
     4782      {
     4783        return this._GroupName;
     4784      }
     4785      set
     4786      {
     4787        if ((this._GroupName != value))
     4788        {
     4789          this.OnGroupNameChanging(value);
     4790          this.SendPropertyChanging();
     4791          this._GroupName = value;
     4792          this.SendPropertyChanged("GroupName");
     4793          this.OnGroupNameChanged();
     4794        }
     4795      }
     4796    }
     4797   
     4798    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName2")]
     4799    public string GroupName2
     4800    {
     4801      get
     4802      {
     4803        return this._GroupName2;
     4804      }
     4805      set
     4806      {
     4807        if ((this._GroupName2 != value))
     4808        {
     4809          this.OnGroupName2Changing(value);
     4810          this.SendPropertyChanging();
     4811          this._GroupName2 = value;
     4812          this.SendPropertyChanged("GroupName2");
     4813          this.OnGroupName2Changed();
    47664814        }
    47674815      }
     
    53595407    private System.DateTime _DateCreated;
    53605408   
     5409    private int _TotalTasks;
     5410   
     5411    private int _CompletedTasks;
     5412   
     5413    private System.Nullable<System.DateTime> _DateCompleted;
     5414   
    53615415    private EntitySet<FactTask> _FactTasks;
    53625416   
     
    53755429    partial void OnDateCreatedChanging(System.DateTime value);
    53765430    partial void OnDateCreatedChanged();
     5431    partial void OnTotalTasksChanging(int value);
     5432    partial void OnTotalTasksChanged();
     5433    partial void OnCompletedTasksChanging(int value);
     5434    partial void OnCompletedTasksChanged();
     5435    partial void OnDateCompletedChanging(System.Nullable<System.DateTime> value);
     5436    partial void OnDateCompletedChanged();
    53775437    #endregion
    53785438   
     
    54635523    }
    54645524   
    5465     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated")]
     5525    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime NOT NULL")]
    54665526    public System.DateTime DateCreated
    54675527    {
     
    54795539          this.SendPropertyChanged("DateCreated");
    54805540          this.OnDateCreatedChanged();
     5541        }
     5542      }
     5543    }
     5544   
     5545    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTasks", DbType="INT NOT NULL")]
     5546    public int TotalTasks
     5547    {
     5548      get
     5549      {
     5550        return this._TotalTasks;
     5551      }
     5552      set
     5553      {
     5554        if ((this._TotalTasks != value))
     5555        {
     5556          this.OnTotalTasksChanging(value);
     5557          this.SendPropertyChanging();
     5558          this._TotalTasks = value;
     5559          this.SendPropertyChanged("TotalTasks");
     5560          this.OnTotalTasksChanged();
     5561        }
     5562      }
     5563    }
     5564   
     5565    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletedTasks", DbType="INT NOT NULL")]
     5566    public int CompletedTasks
     5567    {
     5568      get
     5569      {
     5570        return this._CompletedTasks;
     5571      }
     5572      set
     5573      {
     5574        if ((this._CompletedTasks != value))
     5575        {
     5576          this.OnCompletedTasksChanging(value);
     5577          this.SendPropertyChanging();
     5578          this._CompletedTasks = value;
     5579          this.SendPropertyChanged("CompletedTasks");
     5580          this.OnCompletedTasksChanged();
     5581        }
     5582      }
     5583    }
     5584   
     5585    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCompleted", DbType="DateTime NULL")]
     5586    public System.Nullable<System.DateTime> DateCompleted
     5587    {
     5588      get
     5589      {
     5590        return this._DateCompleted;
     5591      }
     5592      set
     5593      {
     5594        if ((this._DateCompleted != value))
     5595        {
     5596          this.OnDateCompletedChanging(value);
     5597          this.SendPropertyChanging();
     5598          this._DateCompleted = value;
     5599          this.SendPropertyChanged("DateCompleted");
     5600          this.OnDateCompletedChanged();
    54815601        }
    54825602      }
     
    58765996   
    58775997    private double _TotalTimeIdle;
    5878    
    5879     private double _TotalTimeCalculating;
    5880    
    5881     private double _TotalTimeTransferring;
    58825998   
    58835999    private double _TotalTimeOffline;
     
    59156031    partial void OnTotalTimeIdleChanging(double value);
    59166032    partial void OnTotalTimeIdleChanged();
    5917     partial void OnTotalTimeCalculatingChanging(double value);
    5918     partial void OnTotalTimeCalculatingChanged();
    5919     partial void OnTotalTimeTransferringChanging(double value);
    5920     partial void OnTotalTimeTransferringChanged();
    59216033    partial void OnTotalTimeOfflineChanging(double value);
    59226034    partial void OnTotalTimeOfflineChanged();
     
    61276239    }
    61286240   
    6129     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeCalculating", DbType="Float NOT NULL")]
    6130     public double TotalTimeCalculating
    6131     {
    6132       get
    6133       {
    6134         return this._TotalTimeCalculating;
    6135       }
    6136       set
    6137       {
    6138         if ((this._TotalTimeCalculating != value))
    6139         {
    6140           this.OnTotalTimeCalculatingChanging(value);
    6141           this.SendPropertyChanging();
    6142           this._TotalTimeCalculating = value;
    6143           this.SendPropertyChanged("TotalTimeCalculating");
    6144           this.OnTotalTimeCalculatingChanged();
    6145         }
    6146       }
    6147     }
    6148    
    6149     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeTransferring", DbType="Float NOT NULL")]
    6150     public double TotalTimeTransferring
    6151     {
    6152       get
    6153       {
    6154         return this._TotalTimeTransferring;
    6155       }
    6156       set
    6157       {
    6158         if ((this._TotalTimeTransferring != value))
    6159         {
    6160           this.OnTotalTimeTransferringChanging(value);
    6161           this.SendPropertyChanging();
    6162           this._TotalTimeTransferring = value;
    6163           this.SendPropertyChanged("TotalTimeTransferring");
    6164           this.OnTotalTimeTransferringChanged();
    6165         }
    6166       }
    6167     }
    6168    
    61696241    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeOffline", DbType="Float NOT NULL")]
    61706242    public double TotalTimeOffline
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql

    r12484 r12516  
    217217    [ResourceGroupId]  UNIQUEIDENTIFIER NULL,
    218218    [ResourceGroup2Id] UNIQUEIDENTIFIER NULL,
     219  [GroupName]        VARCHAR (MAX)    NULL,
     220  [GroupName2]       VARCHAR (MAX)    NULL,
    219221    CONSTRAINT [PK_DimClient] PRIMARY KEY CLUSTERED ([Id] ASC)
    220222);
    221223CREATE TABLE [statistics].[DimJob] (
    222     [JobId]       UNIQUEIDENTIFIER NOT NULL,
    223     [UserId]      UNIQUEIDENTIFIER NOT NULL,
    224     [JobName]     VARCHAR (MAX)    NOT NULL,
    225     [UserName]    VARCHAR (MAX)    NOT NULL,
    226     [DateCreated] DATETIME       NOT NULL,
     224    [JobId]          UNIQUEIDENTIFIER NOT NULL,
     225    [UserId]         UNIQUEIDENTIFIER NOT NULL,
     226    [JobName]        VARCHAR (MAX)    NOT NULL,
     227    [UserName]       VARCHAR (MAX)    NOT NULL,
     228    [DateCreated]    DATETIME     NOT NULL,
     229    [TotalTasks]     INT              NOT NULL,
     230    [CompletedTasks] INT              NOT NULL,
     231    [DateCompleted]  DATETIME     NULL,
    227232    CONSTRAINT [PK_DimJob] PRIMARY KEY CLUSTERED ([JobId] ASC)
    228233);
     
    243248    [SlaveState]      VarChar(15)    NOT NULL,
    244249    [TotalTimeIdle]         FLOAT (53)       NOT NULL,
    245     [TotalTimeCalculating]  FLOAT (53)       NOT NULL,
    246     [TotalTimeTransferring] FLOAT (53)       NOT NULL,
    247250    [TotalTimeOffline]      FLOAT (53)       NOT NULL,
    248251    [TotalTimeUnavailable]  FLOAT (53)       NOT NULL,
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs

    r12469 r12516  
    317317      exp.JobCount = jobs.Count();
    318318      exp.CalculatingCount = jobs.Count(j => j.State == TaskState.Calculating);
    319       exp.FinishedCount = jobs.Count(j => j.State == TaskState.Finished);
     319      exp.FinishedCount = jobs.Count(j => j.State == TaskState.Finished || j.State == TaskState.Aborted || j.State == TaskState.Failed);
    320320      return exp;
    321321    }
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs

    r12484 r12516  
    3232    private const string UnknownUserName = "Unknown";
    3333    private static readonly TimeSpan SmallestTimeSpan = new TimeSpan(0, 5, 0);
     34    private static readonly TaskState[] CompletedStates = { TaskState.Finished, TaskState.Aborted, TaskState.Failed };
    3435
    3536    public void GenerateStatistics() {
     
    4243        });
    4344
     45        DimTime time = null;
    4446        pm.UseTransaction(() => {
    45           var newTime = UpdateDimTimeTable(pm);
    46           if (newTime != null) {
     47          time = UpdateDimTimeTable(pm);
     48          pm.SubmitChanges();
     49        });
     50
     51        if (time != null) {
     52          pm.UseTransaction(() => {
     53            UpdateFactClientInfoTable(time, pm);
    4754            pm.SubmitChanges();
    48             UpdateFactClientInfoTable(newTime, pm);
    49             UpdateTaskFactsTable(newTime, pm);
     55          });
     56
     57          pm.UseTransaction(() => {
     58            UpdateTaskFactsTable(time, pm);
    5059            try {
     60              pm.SubmitChanges();
     61              UpdateExistingDimJobs(pm);
    5162              pm.SubmitChanges();
    5263            }
     
    5869                          Exception Details: {0}", e));
    5970            }
    60           }
    61         });
     71          });
     72        }
    6273      }
    6374    }
     
    97108      var dimJobDao = pm.DimJobDao;
    98109      var jobDao = pm.JobDao;
     110      var taskDao = pm.TaskDao;
    99111      var dimJobIds = dimJobDao.GetAll().Select(x => x.JobId);
    100112      var newJobs = jobDao.GetAll()
     
    104116          UserId = x.OwnerUserId,
    105117          JobName = x.Name ?? string.Empty,
    106           DateCreated = x.DateCreated
     118          DateCreated = x.DateCreated,
     119          TotalTasks = taskDao.GetAll().Count(y => y.JobId == x.JobId)
    107120        })
    108121        .ToList();
     
    112125        UserId = x.UserId,
    113126        UserName = GetUserName(x.UserId),
    114         DateCreated = x.DateCreated
     127        DateCreated = x.DateCreated,
     128        TotalTasks = x.TotalTasks,
     129        CompletedTasks = 0,
     130        DateCompleted = null
    115131      }));
     132    }
     133
     134    private void UpdateExistingDimJobs(PersistenceManager pm) {
     135      var dimJobDao = pm.DimJobDao;
     136      var factTaskDao = pm.FactTaskDao;
     137      foreach (var dimJob in dimJobDao.GetNotCompletedJobs()) {
     138        var taskStates = factTaskDao.GetByJobId(dimJob.JobId)
     139            .GroupBy(x => x.TaskState)
     140            .Select(x => new {
     141              State = x.Key,
     142              Count = x.Count()
     143            }).ToList();
     144        int totalTasks = 0, completedTasks = 0;
     145        foreach (var state in taskStates) {
     146          totalTasks += state.Count;
     147          if (CompletedStates.Contains(state.State)) {
     148            completedTasks += state.Count;
     149          }
     150        }
     151        if (totalTasks == completedTasks) {
     152          dimJob.DateCompleted = factTaskDao.GetLastCompletedTaskFromJob(dimJob.JobId);
     153        }
     154        dimJob.TotalTasks = totalTasks;
     155        dimJob.CompletedTasks = completedTasks;
     156      }
    116157    }
    117158
     
    120161      var slaveDao = pm.SlaveDao;
    121162      var slaves = slaveDao.GetAll();
    122       var recentlyAddedClients = dimClientDao.GetRecentlyAddedClients();
     163      var recentlyAddedClients = dimClientDao.GetActiveClients();
    123164      var slaveIds = slaves.Select(x => x.ResourceId);
    124165
     
    136177          ClientId = client.Id
    137178        };
    138       var clientIds = dimClientDao.GetAll().Select(x => x.ResourceId);
     179      var clientIds = dimClientDao.GetActiveClients().Select(x => x.ResourceId);
    139180      var modifiedClientIds = modifiedClients.Select(x => x.SlaveId);
    140181      var newClients = slaves
     
    145186          x.Name,
    146187          ResourceGroupId = x.ParentResourceId,
    147           ResourceGroup2Id = x.ParentResource.ParentResourceId
     188          GroupName = x.ParentResource.Name,
     189          ResourceGroup2Id = x.ParentResource.ParentResourceId,
     190          GroupName2 = x.ParentResource.ParentResource.Name
    148191        })
    149192        .ToList();
     
    156199        ExpirationTime = null,
    157200        ResourceGroupId = x.ResourceGroupId,
    158         ResourceGroup2Id = x.ResourceGroup2Id
     201        GroupName = x.GroupName,
     202        ResourceGroup2Id = x.ResourceGroup2Id,
     203        GroupName2 = x.GroupName2
    159204      }));
    160205    }
     
    167212      var newRawFactInfos =
    168213        from s in slaveDao.GetAll()
    169         join c in dimClientDao.GetRecentlyAddedClients() on s.ResourceId equals c.ResourceId
     214        join c in dimClientDao.GetActiveClients() on s.ResourceId equals c.ResourceId
    170215        join lcf in factClientInfoDao.GetLastUpdateTimestamps() on c.ResourceId equals lcf.ResourceId into joinCf
    171216        from cf in joinCf.DefaultIfEmpty()
     
    186231        from x in newRawFactInfos.ToList()
    187232        let duration = x.LastFactTimestamp != null
    188                        ? (newTime.Time - (DateTime)x.LastFactTimestamp).TotalMinutes
    189                        : SmallestTimeSpan.TotalMinutes
     233                       ? (int)(newTime.Time - (DateTime)x.LastFactTimestamp).TotalSeconds
     234                       : (int)SmallestTimeSpan.TotalSeconds
    190235        select new FactClientInfo {
    191236          ClientId = x.ClientId,
     
    193238          UserId = x.UserId,
    194239          NumUsedCores = x.TotalCores - x.FreeCores,
    195           NumTotalCores = x.TotalMemory,
     240          NumTotalCores = x.TotalCores,
    196241          UsedMemory = x.TotalMemory - x.FreeMemory,
    197242          TotalMemory = x.TotalMemory,
     
    199244          SlaveState = x.SlaveState,
    200245          TotalTimeIdle = x.SlaveState == SlaveState.Idle && x.IsAllowedToCalculate ? duration : 0.0,
    201           TotalTimeCalculating = x.SlaveState == SlaveState.Calculating ? duration : 0.0,
    202246          TotalTimeUnavailable = x.SlaveState == SlaveState.Idle && !x.IsAllowedToCalculate ? duration : 0.0,
    203247          TotalTimeOffline = x.SlaveState == SlaveState.Offline ? duration : 0.0
     
    226270        join lastFactTask in notFinishedFactTasks on task.TaskId equals lastFactTask.TaskId into lastFactPerTask
    227271        from lastFact in lastFactPerTask.DefaultIfEmpty()
    228         join client in dimClientDao.GetRecentlyAddedClients() on lastSlaveId equals client.ResourceId into clientsPerSlaveId
     272        join client in dimClientDao.GetActiveClients() on lastSlaveId equals client.ResourceId into clientsPerSlaveId
    229273        from client in clientsPerSlaveId.DefaultIfEmpty()
    230274        select new {
  • branches/HiveStatistics/sources/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj

    r11623 r12516  
    315315  </ItemGroup>
    316316  <ItemGroup>
    317     <ProjectReference Include="..\..\HeuristicLab.GeoIP\1.12\HeuristicLab.GeoIP.csproj">
    318       <Project>{BE9B0229-9150-49A4-AEA6-BB58E055992F}</Project>
    319       <Name>HeuristicLab.GeoIP</Name>
    320     </ProjectReference>
    321317    <ProjectReference Include="..\..\HeuristicLab.Services.Access.DataAccess\3.3\HeuristicLab.Services.Access.DataAccess-3.3.csproj">
    322318      <Project>{0F652437-998A-4EAB-8BF1-444B5FE8CE97}</Project>
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3

    • Property svn:global-ignores set to
      obj
    • Property svn:ignore set to
      bin
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/HeuristicLab.Services.WebApp.Statistics-3.3.csproj

    r12477 r12516  
    140140  </ItemGroup>
    141141  <ItemGroup>
    142     <Compile Include="WebApi\DataController.cs" />
     142    <Compile Include="WebApi\ClientController.cs" />
    143143    <Compile Include="Properties\AssemblyInfo.cs" />
    144144    <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" />
    145149    <Compile Include="WebApi\DataTransfer\Job.cs" />
     150    <Compile Include="WebApi\DataTransfer\JobDetails.cs" />
     151    <Compile Include="WebApi\DataTransfer\JobPage.cs" />
    146152    <Compile Include="WebApi\DataTransfer\Task.cs" />
     153    <Compile Include="WebApi\DataTransfer\TaskPage.cs" />
     154    <Compile Include="WebApi\DataTransfer\TaskStateCount.cs" />
    147155    <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" />
    148160  </ItemGroup>
    149161  <ItemGroup>
     
    151163      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    152164    </Content>
     165    <Content Include="WebApp\clients\details\clientDetailsCtrl.js">
     166      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     167    </Content>
    153168    <Content Include="WebApp\clients\clientsCtrl.js">
    154169      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    155170    </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>
    156180    <Content Include="WebApp\jobs\jobsCtrl.js">
    157181      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    158182    </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>
    159189    <Content Include="WebApp\services\statisticsService.js">
    160190      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    161191    </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>
    162198    <Content Include="WebApp\statistics.css">
     199      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     200    </Content>
     201    <Content Include="WebApp\users\details\userDetailsCtrl.js">
    163202      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    164203    </Content>
     
    179218    </Content>
    180219    <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">
    181235      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    182236    </Content>
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Client.cs

    r12477 r12516  
    2626    public Guid Id { get; set; }
    2727    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; }
    2835  }
    2936}
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Job.cs

    r12477 r12516  
    2626    public Guid Id { get; set; }
    2727    public string Name { get; set; }
     28    public Guid UserId { get; set; }
     29    public string UserName { get; set; }
    2830    public DateTime DateCreated { get; set; }
     31    public int TotalTasks { get; set; }
     32    public int CompletedTasks { get; set; }
     33    public DateTime? DateCompleted { get; set; }
    2934  }
    3035}
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Task.cs

    r12484 r12516  
    2525  public class Task {
    2626    public Guid Id { get; set; }
     27    public Guid JobId { get; set; }
     28    public string JobName { get; set; }
     29    public long TotalTime { get; set; }
    2730    public double CalculatingTime { get; set; }
    2831    public double WaitingTime { get; set; }
     
    3639    public string State { get; set; }
    3740    public Guid? LastClientId { get; set; }
     41    public string LastClientName { get; set; }
     42    public Guid UserId { get; set; }
     43    public string UserName { get; set; }
    3844    public DateTime? StartTime { get; set; }
    3945    public DateTime? EndTime { get; set; }
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clients.cshtml

    r12477 r12516  
    11@using HeuristicLab.Services.Access.DataTransfer
    22@using HeuristicLab.Services.Hive
    3 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) {
    43<header class="view-header">
    54    <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    {
    910        <li>
    1011            <a ng-href="#/statistics/users">Users</a>
    1112        </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>
    1517    </ul>
    1618</header>
    1719
    1820<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>
    1961
     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>
    20102</div>
    21 }
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clientsCtrl.js

    r12477 r12516  
    22    var module = appStatisticsPlugin.getAngularModule();
    33    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
    648        }]
    749    );
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobs.cshtml

    r12484 r12516  
    1010                <a ng-href="#/statistics/users">Users</a>
    1111            </li>
    12             <li>
    13                 <a ng-href="#/statistics/clients">Clients</a>
    14             </li>
    1512        }
     13        <li>
     14            <a ng-href="#/statistics/clients">Clients</a>
     15        </li>
    1616    </ul>
    1717</header>
    1818
    1919<div class="default-view-container">
    20 
    21 
    2220    <div class="row">
    2321        <div class="col-lg-12">
    2422            <div class="panel panel-default">
    2523                <div class="panel-heading">
    26                     <h3 class="panel-title">My Jobs</h3>
     24                    <h3 class="panel-title">Current Jobs</h3>
    2725                </div>
    2826                <div class="panel-body">
    2927                    <table class="table table-hover table-condensed">
    3028                        <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>
    3736                        </thead>
    3837                        <tr ng-repeat="job in jobs">
     
    4039                            <td>{{job.Name}}</td>
    4140                            <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>
    4347                        </tr>
    4448                        <tr ng-hide="jobs.length">
    45                             <td colspan="4" class="text-center">No jobs found!</td>
     49                            <td colspan="5" class="text-center">No active jobs found!</td>
    4650                        </tr>
    4751                    </table>
     
    5155    </div>
    5256
    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">
    5659            <div class="panel panel-default">
    57 
    5860                <div class="panel-heading">
    59                     <h3 class="panel-title">Task {{$index + 1}}</h3>
     61                    <h3 class="panel-title">Completed Jobs</h3>
    6062                </div>
    6163                <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>
    6366                        <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>
    6673                        </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>
    7082                        </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>
    10685                        </tr>
    10786                    </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>
    10893                </div>
    109 
    11094            </div>
    11195        </div>
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobsCtrl.js

    r12484 r12516  
    22    var module = appStatisticsPlugin.getAngularModule();
    33    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) {
    711                    $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                    }
    816                });
    917            };
    1018
    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                );
    1530            };
    1631
    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
    1847        }]
    1948    );
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/services/statisticsService.js

    r12477 r12516  
    44    module.factory('app.statistics.data.service',
    55        ['$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' } },
    78                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' } },
    813                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' } }
    1026            });
    1127        }]
  • 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  
    1717
    1818<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>
    2049</div>
    2150}
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/usersCtrl.js

    r12477 r12516  
    22    var module = appStatisticsPlugin.getAngularModule();
    33    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
    620        }]
    721    );
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/statistics.js

    r12477 r12516  
    22(function () {
    33    var plugin = appStatisticsPlugin;
    4     plugin.dependencies = ['ngResource', 'ui.knob', 'ui.bootstrap'];
     4    plugin.dependencies = ['ngResource', 'ui.knob', 'ui.bootstrap', 'ngFitText'];
    55    plugin.files = [
     6        'WebApp/statistics.css',
    67        'WebApp/services/statisticsService.js',
     8        'WebApp/services/jobService.js',
     9        'WebApp/services/taskService.js',
     10        'WebApp/services/userService.js',
     11        'WebApp/services/clientService.js',
    712        'WebApp/jobs/jobsCtrl.js',
     13        'WebApp/jobs/details/jobDetailsCtrl.js',
     14        'WebApp/jobs/details/jobTaskDetailsDialogCtrl.js',
    815        'WebApp/clients/clientsCtrl.js',
     16        'WebApp/clients/details/clientDetailsCtrl.js',
     17        'WebApp/clients/details/clientTaskDetailsDialogCtrl.js',
    918        'WebApp/users/usersCtrl.js',
     19        'WebApp/users/details/userDetailsCtrl.js'
    1020    ];
    1121    plugin.view = 'WebApp/jobs/jobs.cshtml';
     
    1323    plugin.routes = [
    1424        new Route('jobs', 'WebApp/jobs/jobs.cshtml', 'app.statistics.jobsCtrl'),
     25        new Route('jobs/:id', 'WebApp/jobs/details/jobDetails.cshtml', 'app.statistics.jobDetailsCtrl'),
    1526        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')
    1730    ];
    1831    var menu = app.getMenu();
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/Status.cs

    r12435 r12516  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324
     
    6162  }
    6263
     64  public class TimeStatus {
     65    public long MinCalculatingTime { get; set; }
     66    public long MaxCalculatingTime { get; set; }
     67    public long AvgCalculatingTime { get; set; }
     68    public long AvgWaitingTime { get; set; }
     69    public long TotalCpuTime { get; set; }
     70    public DateTime BeginDate { get; set; }
     71  }
     72
    6373  public class Status {
    6474    public CoreStatus CoreStatus { get; set; }
    6575    public CpuUtilizationStatus CpuUtilizationStatus { get; set; }
    6676    public MemoryStatus MemoryStatus { get; set; }
     77    public TimeStatus TimeStatus { get; set; }
    6778    public IEnumerable<TaskStatus> TasksStatus { get; set; }
    6879    public IEnumerable<SlaveStatus> SlavesStatus { get; set; }
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/history/history.cshtml

    r12435 r12516  
    5656                <div class="panel-body">
    5757                    <flot dataset="coreSeries" options="fillChartOptions"></flot>
    58                     <p>{{maxUpper}}</p>
    59                     <p>{{fromDateTime}}</p>
    60                     <p>{{toDateTime}}</p>
    6158                </div>
    6259            </div>
Note: See TracChangeset for help on using the changeset viewer.