Changeset 12516 for branches/HiveStatistics
- Timestamp:
- 06/25/15 18:34:40 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 30 added
- 1 deleted
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 12470-12476,12478-12482,12485,12488,12490-12494,12496-12497,12504,12506-12507,12509,12511-12512,12514
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab 3.3 Services.sln
r12477 r12516 49 49 Project("{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}" 50 50 EndProject 51 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.GeoIP", "HeuristicLab.GeoIP\1.12\HeuristicLab.GeoIP.csproj", "{BE9B0229-9150-49A4-AEA6-BB58E055992F}"52 EndProject53 51 Project("{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}" 54 52 EndProject … … 69 67 .nuget\NuGet.targets = .nuget\NuGet.targets 70 68 EndProjectSection 69 EndProject 70 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.GeoIP", "HeuristicLab.ExtLibs\HeuristicLab.GeoIP\1.12\HeuristicLab.GeoIP.csproj", "{BE9B0229-9150-49A4-AEA6-BB58E055992F}" 71 71 EndProject 72 72 Project("{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}" … … 161 161 {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|x86.ActiveCfg = Release|x86 162 162 {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|x86.Build.0 = Release|x86 163 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU164 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Any CPU.Build.0 = Debug|Any CPU165 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x64.ActiveCfg = Release|x64166 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x64.Build.0 = Release|x64167 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x86.ActiveCfg = Release|x86168 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x86.Build.0 = Release|x86169 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Any CPU.ActiveCfg = Release|Any CPU170 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Any CPU.Build.0 = Release|Any CPU171 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x64.ActiveCfg = Release|x64172 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x64.Build.0 = Release|x64173 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x86.ActiveCfg = Release|x86174 {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x86.Build.0 = Release|x86175 163 {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 176 164 {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|Any CPU.Build.0 = Debug|Any CPU … … 245 233 {2351DBE7-D0E1-44F9-9CE9-2F0F5E580572}.Release|x86.ActiveCfg = Release|x86 246 234 {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 247 247 {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 248 248 {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 251 253 {1BC54353-7D4C-4734-BAA9-3D11B3242B59}.Release|Any CPU.ActiveCfg = Release|Any CPU 252 254 {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 255 259 EndGlobalSection 256 260 GlobalSection(SolutionProperties) = preSolution -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs
r12468 r12516 37 37 return Table.SingleOrDefault(x => x.Id == id); 38 38 } 39 public IQueryable<DimClient> Get RecentlyAddedClients() {39 public IQueryable<DimClient> GetActiveClients() { 40 40 return Table.Where(x => x.ExpirationTime == null); 41 } 42 43 public IQueryable<DimClient> GetExpiredClients() { 44 return Table.Where(x => x.ExpirationTime != null); 41 45 } 42 46 -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimJobDao.cs
r12477 r12516 35 35 return Table.Where(x => x.UserId == id); 36 36 } 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 } 37 45 } 38 46 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactClientInfoDao.cs
r12468 r12516 59 59 }; 60 60 } 61 62 public IQueryable<FactClientInfo> GetByClientId(Guid id) { 63 return Table.Where(x => x.ClientId == id); 64 } 61 65 } 62 66 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs
r12477 r12516 44 44 } 45 45 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 46 54 public override void Delete(IEnumerable<Guid> ids) { 47 55 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 35 35 return Table.Where(x => !x.IsParentTask); 36 36 } 37 38 public IQueryable<Task> GetAllByJobId(Guid id) { 39 return Table.Where(x => x.JobId == id); 40 } 37 41 } 38 42 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
r12484 r12516 218 218 <Column Name="ResourceGroupId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 219 219 <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" /> 220 222 <Association Name="DimClient_FactTask" Member="FactTasks" ThisKey="Id" OtherKey="LastClientId" Type="FactTask" /> 221 223 <Association Name="DimClient_FactClientInfo" Member="FactClientInfos" ThisKey="Id" OtherKey="ClientId" Type="FactClientInfo" /> … … 250 252 <Column Name="JobName" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" /> 251 253 <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" /> 253 258 <Association Name="DimJob_FactTask" Member="FactTasks" ThisKey="JobId" OtherKey="JobId" Type="FactTask" /> 254 259 </Type> … … 283 288 <Column Name="CpuUtilization" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" /> 284 289 <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" />287 290 <Column Name="TotalTimeOffline" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" /> 288 291 <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 1 1 <?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"> 3 3 <DataContextMoniker Name="/HiveDataContext" /> 4 4 <nestedChildShapes> … … 247 247 </nestedChildShapes> 248 248 </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"> 250 250 <DataClassMoniker Name="/HiveDataContext/DimClient" /> 251 251 <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" /> 253 253 </nestedChildShapes> 254 254 </classShape> … … 259 259 </nestedChildShapes> 260 260 </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"> 262 262 <DataClassMoniker Name="/HiveDataContext/DimJob" /> 263 263 <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" /> 265 265 </nestedChildShapes> 266 266 </classShape> … … 277 277 </nestedChildShapes> 278 278 </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"> 280 280 <DataClassMoniker Name="/HiveDataContext/FactClientInfo" /> 281 281 <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" /> 283 283 </nestedChildShapes> 284 284 </classShape> … … 290 290 </nodes> 291 291 </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"> 293 293 <AssociationMoniker Name="/HiveDataContext/DimJob/DimJob_FactTask" /> 294 294 <nodes> … … 297 297 </nodes> 298 298 </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"> 300 300 <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactClientInfo" /> 301 301 <nodes> … … 311 311 </nodes> 312 312 </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"> 314 314 <AssociationMoniker Name="/HiveDataContext/DimUser/DimUser_FactClientInfo" /> 315 315 <nodes> -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
r12484 r12516 4619 4619 private System.Nullable<System.Guid> _ResourceGroup2Id; 4620 4620 4621 private string _GroupName; 4622 4623 private string _GroupName2; 4624 4621 4625 private EntitySet<FactTask> _FactTasks; 4622 4626 … … 4639 4643 partial void OnResourceGroup2IdChanging(System.Nullable<System.Guid> value); 4640 4644 partial void OnResourceGroup2IdChanged(); 4645 partial void OnGroupNameChanging(string value); 4646 partial void OnGroupNameChanged(); 4647 partial void OnGroupName2Changing(string value); 4648 partial void OnGroupName2Changed(); 4641 4649 #endregion 4642 4650 … … 4764 4772 this.SendPropertyChanged("ResourceGroup2Id"); 4765 4773 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(); 4766 4814 } 4767 4815 } … … 5359 5407 private System.DateTime _DateCreated; 5360 5408 5409 private int _TotalTasks; 5410 5411 private int _CompletedTasks; 5412 5413 private System.Nullable<System.DateTime> _DateCompleted; 5414 5361 5415 private EntitySet<FactTask> _FactTasks; 5362 5416 … … 5375 5429 partial void OnDateCreatedChanging(System.DateTime value); 5376 5430 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(); 5377 5437 #endregion 5378 5438 … … 5463 5523 } 5464 5524 5465 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated" )]5525 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime NOT NULL")] 5466 5526 public System.DateTime DateCreated 5467 5527 { … … 5479 5539 this.SendPropertyChanged("DateCreated"); 5480 5540 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(); 5481 5601 } 5482 5602 } … … 5876 5996 5877 5997 private double _TotalTimeIdle; 5878 5879 private double _TotalTimeCalculating;5880 5881 private double _TotalTimeTransferring;5882 5998 5883 5999 private double _TotalTimeOffline; … … 5915 6031 partial void OnTotalTimeIdleChanging(double value); 5916 6032 partial void OnTotalTimeIdleChanged(); 5917 partial void OnTotalTimeCalculatingChanging(double value);5918 partial void OnTotalTimeCalculatingChanged();5919 partial void OnTotalTimeTransferringChanging(double value);5920 partial void OnTotalTimeTransferringChanged();5921 6033 partial void OnTotalTimeOfflineChanging(double value); 5922 6034 partial void OnTotalTimeOfflineChanged(); … … 6127 6239 } 6128 6240 6129 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeCalculating", DbType="Float NOT NULL")]6130 public double TotalTimeCalculating6131 {6132 get6133 {6134 return this._TotalTimeCalculating;6135 }6136 set6137 {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 TotalTimeTransferring6151 {6152 get6153 {6154 return this._TotalTimeTransferring;6155 }6156 set6157 {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 6169 6241 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeOffline", DbType="Float NOT NULL")] 6170 6242 public double TotalTimeOffline -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
r12484 r12516 217 217 [ResourceGroupId] UNIQUEIDENTIFIER NULL, 218 218 [ResourceGroup2Id] UNIQUEIDENTIFIER NULL, 219 [GroupName] VARCHAR (MAX) NULL, 220 [GroupName2] VARCHAR (MAX) NULL, 219 221 CONSTRAINT [PK_DimClient] PRIMARY KEY CLUSTERED ([Id] ASC) 220 222 ); 221 223 CREATE 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, 227 232 CONSTRAINT [PK_DimJob] PRIMARY KEY CLUSTERED ([JobId] ASC) 228 233 ); … … 243 248 [SlaveState] VarChar(15) NOT NULL, 244 249 [TotalTimeIdle] FLOAT (53) NOT NULL, 245 [TotalTimeCalculating] FLOAT (53) NOT NULL,246 [TotalTimeTransferring] FLOAT (53) NOT NULL,247 250 [TotalTimeOffline] FLOAT (53) NOT NULL, 248 251 [TotalTimeUnavailable] FLOAT (53) NOT NULL, -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs
r12469 r12516 317 317 exp.JobCount = jobs.Count(); 318 318 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); 320 320 return exp; 321 321 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs
r12484 r12516 32 32 private const string UnknownUserName = "Unknown"; 33 33 private static readonly TimeSpan SmallestTimeSpan = new TimeSpan(0, 5, 0); 34 private static readonly TaskState[] CompletedStates = { TaskState.Finished, TaskState.Aborted, TaskState.Failed }; 34 35 35 36 public void GenerateStatistics() { … … 42 43 }); 43 44 45 DimTime time = null; 44 46 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); 47 54 pm.SubmitChanges(); 48 UpdateFactClientInfoTable(newTime, pm); 49 UpdateTaskFactsTable(newTime, pm); 55 }); 56 57 pm.UseTransaction(() => { 58 UpdateTaskFactsTable(time, pm); 50 59 try { 60 pm.SubmitChanges(); 61 UpdateExistingDimJobs(pm); 51 62 pm.SubmitChanges(); 52 63 } … … 58 69 Exception Details: {0}", e)); 59 70 } 60 } 61 } );71 }); 72 } 62 73 } 63 74 } … … 97 108 var dimJobDao = pm.DimJobDao; 98 109 var jobDao = pm.JobDao; 110 var taskDao = pm.TaskDao; 99 111 var dimJobIds = dimJobDao.GetAll().Select(x => x.JobId); 100 112 var newJobs = jobDao.GetAll() … … 104 116 UserId = x.OwnerUserId, 105 117 JobName = x.Name ?? string.Empty, 106 DateCreated = x.DateCreated 118 DateCreated = x.DateCreated, 119 TotalTasks = taskDao.GetAll().Count(y => y.JobId == x.JobId) 107 120 }) 108 121 .ToList(); … … 112 125 UserId = x.UserId, 113 126 UserName = GetUserName(x.UserId), 114 DateCreated = x.DateCreated 127 DateCreated = x.DateCreated, 128 TotalTasks = x.TotalTasks, 129 CompletedTasks = 0, 130 DateCompleted = null 115 131 })); 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 } 116 157 } 117 158 … … 120 161 var slaveDao = pm.SlaveDao; 121 162 var slaves = slaveDao.GetAll(); 122 var recentlyAddedClients = dimClientDao.Get RecentlyAddedClients();163 var recentlyAddedClients = dimClientDao.GetActiveClients(); 123 164 var slaveIds = slaves.Select(x => x.ResourceId); 124 165 … … 136 177 ClientId = client.Id 137 178 }; 138 var clientIds = dimClientDao.GetA ll().Select(x => x.ResourceId);179 var clientIds = dimClientDao.GetActiveClients().Select(x => x.ResourceId); 139 180 var modifiedClientIds = modifiedClients.Select(x => x.SlaveId); 140 181 var newClients = slaves … … 145 186 x.Name, 146 187 ResourceGroupId = x.ParentResourceId, 147 ResourceGroup2Id = x.ParentResource.ParentResourceId 188 GroupName = x.ParentResource.Name, 189 ResourceGroup2Id = x.ParentResource.ParentResourceId, 190 GroupName2 = x.ParentResource.ParentResource.Name 148 191 }) 149 192 .ToList(); … … 156 199 ExpirationTime = null, 157 200 ResourceGroupId = x.ResourceGroupId, 158 ResourceGroup2Id = x.ResourceGroup2Id 201 GroupName = x.GroupName, 202 ResourceGroup2Id = x.ResourceGroup2Id, 203 GroupName2 = x.GroupName2 159 204 })); 160 205 } … … 167 212 var newRawFactInfos = 168 213 from s in slaveDao.GetAll() 169 join c in dimClientDao.Get RecentlyAddedClients() on s.ResourceId equals c.ResourceId214 join c in dimClientDao.GetActiveClients() on s.ResourceId equals c.ResourceId 170 215 join lcf in factClientInfoDao.GetLastUpdateTimestamps() on c.ResourceId equals lcf.ResourceId into joinCf 171 216 from cf in joinCf.DefaultIfEmpty() … … 186 231 from x in newRawFactInfos.ToList() 187 232 let duration = x.LastFactTimestamp != null 188 ? ( newTime.Time - (DateTime)x.LastFactTimestamp).TotalMinutes189 : SmallestTimeSpan.TotalMinutes233 ? (int)(newTime.Time - (DateTime)x.LastFactTimestamp).TotalSeconds 234 : (int)SmallestTimeSpan.TotalSeconds 190 235 select new FactClientInfo { 191 236 ClientId = x.ClientId, … … 193 238 UserId = x.UserId, 194 239 NumUsedCores = x.TotalCores - x.FreeCores, 195 NumTotalCores = x.Total Memory,240 NumTotalCores = x.TotalCores, 196 241 UsedMemory = x.TotalMemory - x.FreeMemory, 197 242 TotalMemory = x.TotalMemory, … … 199 244 SlaveState = x.SlaveState, 200 245 TotalTimeIdle = x.SlaveState == SlaveState.Idle && x.IsAllowedToCalculate ? duration : 0.0, 201 TotalTimeCalculating = x.SlaveState == SlaveState.Calculating ? duration : 0.0,202 246 TotalTimeUnavailable = x.SlaveState == SlaveState.Idle && !x.IsAllowedToCalculate ? duration : 0.0, 203 247 TotalTimeOffline = x.SlaveState == SlaveState.Offline ? duration : 0.0 … … 226 270 join lastFactTask in notFinishedFactTasks on task.TaskId equals lastFactTask.TaskId into lastFactPerTask 227 271 from lastFact in lastFactPerTask.DefaultIfEmpty() 228 join client in dimClientDao.Get RecentlyAddedClients() on lastSlaveId equals client.ResourceId into clientsPerSlaveId272 join client in dimClientDao.GetActiveClients() on lastSlaveId equals client.ResourceId into clientsPerSlaveId 229 273 from client in clientsPerSlaveId.DefaultIfEmpty() 230 274 select new { -
branches/HiveStatistics/sources/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj
r11623 r12516 315 315 </ItemGroup> 316 316 <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>321 317 <ProjectReference Include="..\..\HeuristicLab.Services.Access.DataAccess\3.3\HeuristicLab.Services.Access.DataAccess-3.3.csproj"> 322 318 <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
-
Property
svn:global-ignores
set to
-
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/HeuristicLab.Services.WebApp.Statistics-3.3.csproj
r12477 r12516 140 140 </ItemGroup> 141 141 <ItemGroup> 142 <Compile Include="WebApi\ DataController.cs" />142 <Compile Include="WebApi\ClientController.cs" /> 143 143 <Compile Include="Properties\AssemblyInfo.cs" /> 144 144 <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" /> 145 149 <Compile Include="WebApi\DataTransfer\Job.cs" /> 150 <Compile Include="WebApi\DataTransfer\JobDetails.cs" /> 151 <Compile Include="WebApi\DataTransfer\JobPage.cs" /> 146 152 <Compile Include="WebApi\DataTransfer\Task.cs" /> 153 <Compile Include="WebApi\DataTransfer\TaskPage.cs" /> 154 <Compile Include="WebApi\DataTransfer\TaskStateCount.cs" /> 147 155 <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" /> 148 160 </ItemGroup> 149 161 <ItemGroup> … … 151 163 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 152 164 </Content> 165 <Content Include="WebApp\clients\details\clientDetailsCtrl.js"> 166 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 167 </Content> 153 168 <Content Include="WebApp\clients\clientsCtrl.js"> 154 169 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 155 170 </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> 156 180 <Content Include="WebApp\jobs\jobsCtrl.js"> 157 181 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 158 182 </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> 159 189 <Content Include="WebApp\services\statisticsService.js"> 160 190 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 161 191 </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> 162 198 <Content Include="WebApp\statistics.css"> 199 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 200 </Content> 201 <Content Include="WebApp\users\details\userDetailsCtrl.js"> 163 202 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 164 203 </Content> … … 179 218 </Content> 180 219 <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"> 181 235 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 182 236 </Content> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Client.cs
r12477 r12516 26 26 public Guid Id { get; set; } 27 27 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; } 28 35 } 29 36 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Job.cs
r12477 r12516 26 26 public Guid Id { get; set; } 27 27 public string Name { get; set; } 28 public Guid UserId { get; set; } 29 public string UserName { get; set; } 28 30 public DateTime DateCreated { get; set; } 31 public int TotalTasks { get; set; } 32 public int CompletedTasks { get; set; } 33 public DateTime? DateCompleted { get; set; } 29 34 } 30 35 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Task.cs
r12484 r12516 25 25 public class Task { 26 26 public Guid Id { get; set; } 27 public Guid JobId { get; set; } 28 public string JobName { get; set; } 29 public long TotalTime { get; set; } 27 30 public double CalculatingTime { get; set; } 28 31 public double WaitingTime { get; set; } … … 36 39 public string State { get; set; } 37 40 public Guid? LastClientId { get; set; } 41 public string LastClientName { get; set; } 42 public Guid UserId { get; set; } 43 public string UserName { get; set; } 38 44 public DateTime? StartTime { get; set; } 39 45 public DateTime? EndTime { get; set; } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clients.cshtml
r12477 r12516 1 1 @using HeuristicLab.Services.Access.DataTransfer 2 2 @using HeuristicLab.Services.Hive 3 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) {4 3 <header class="view-header"> 5 4 <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 { 9 10 <li> 10 11 <a ng-href="#/statistics/users">Users</a> 11 12 </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> 15 17 </ul> 16 18 </header> 17 19 18 20 <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> 19 61 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> 20 102 </div> 21 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clientsCtrl.js
r12477 r12516 2 2 var module = appStatisticsPlugin.getAngularModule(); 3 3 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 6 48 }] 7 49 ); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobs.cshtml
r12484 r12516 10 10 <a ng-href="#/statistics/users">Users</a> 11 11 </li> 12 <li>13 <a ng-href="#/statistics/clients">Clients</a>14 </li>15 12 } 13 <li> 14 <a ng-href="#/statistics/clients">Clients</a> 15 </li> 16 16 </ul> 17 17 </header> 18 18 19 19 <div class="default-view-container"> 20 21 22 20 <div class="row"> 23 21 <div class="col-lg-12"> 24 22 <div class="panel panel-default"> 25 23 <div class="panel-heading"> 26 <h3 class="panel-title"> MyJobs</h3>24 <h3 class="panel-title">Current Jobs</h3> 27 25 </div> 28 26 <div class="panel-body"> 29 27 <table class="table table-hover table-condensed"> 30 28 <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> 37 36 </thead> 38 37 <tr ng-repeat="job in jobs"> … … 40 39 <td>{{job.Name}}</td> 41 40 <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> 43 47 </tr> 44 48 <tr ng-hide="jobs.length"> 45 <td colspan=" 4" class="text-center">Nojobs found!</td>49 <td colspan="5" class="text-center">No active jobs found!</td> 46 50 </tr> 47 51 </table> … … 51 55 </div> 52 56 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"> 56 59 <div class="panel panel-default"> 57 58 60 <div class="panel-heading"> 59 <h3 class="panel-title"> Task {{$index + 1}}</h3>61 <h3 class="panel-title">Completed Jobs</h3> 60 62 </div> 61 63 <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> 63 66 <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> 66 73 </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> 70 82 </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> 106 85 </tr> 107 86 </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> 108 93 </div> 109 110 94 </div> 111 95 </div> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobsCtrl.js
r12484 r12516 2 2 var module = appStatisticsPlugin.getAngularModule(); 3 3 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) { 7 11 $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 } 8 16 }); 9 17 }; 10 18 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 ); 15 30 }; 16 31 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 18 47 }] 19 48 ); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/services/statisticsService.js
r12477 r12516 4 4 module.factory('app.statistics.data.service', 5 5 ['$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' } }, 7 8 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' } }, 8 13 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' } } 10 26 }); 11 27 }] -
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 17 17 18 18 <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> 20 49 </div> 21 50 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/usersCtrl.js
r12477 r12516 2 2 var module = appStatisticsPlugin.getAngularModule(); 3 3 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 6 20 }] 7 21 ); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/statistics.js
r12477 r12516 2 2 (function () { 3 3 var plugin = appStatisticsPlugin; 4 plugin.dependencies = ['ngResource', 'ui.knob', 'ui.bootstrap' ];4 plugin.dependencies = ['ngResource', 'ui.knob', 'ui.bootstrap', 'ngFitText']; 5 5 plugin.files = [ 6 'WebApp/statistics.css', 6 7 'WebApp/services/statisticsService.js', 8 'WebApp/services/jobService.js', 9 'WebApp/services/taskService.js', 10 'WebApp/services/userService.js', 11 'WebApp/services/clientService.js', 7 12 'WebApp/jobs/jobsCtrl.js', 13 'WebApp/jobs/details/jobDetailsCtrl.js', 14 'WebApp/jobs/details/jobTaskDetailsDialogCtrl.js', 8 15 'WebApp/clients/clientsCtrl.js', 16 'WebApp/clients/details/clientDetailsCtrl.js', 17 'WebApp/clients/details/clientTaskDetailsDialogCtrl.js', 9 18 'WebApp/users/usersCtrl.js', 19 'WebApp/users/details/userDetailsCtrl.js' 10 20 ]; 11 21 plugin.view = 'WebApp/jobs/jobs.cshtml'; … … 13 23 plugin.routes = [ 14 24 new Route('jobs', 'WebApp/jobs/jobs.cshtml', 'app.statistics.jobsCtrl'), 25 new Route('jobs/:id', 'WebApp/jobs/details/jobDetails.cshtml', 'app.statistics.jobDetailsCtrl'), 15 26 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') 17 30 ]; 18 31 var menu = app.getMenu(); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/Status.cs
r12435 r12516 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 … … 61 62 } 62 63 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 63 73 public class Status { 64 74 public CoreStatus CoreStatus { get; set; } 65 75 public CpuUtilizationStatus CpuUtilizationStatus { get; set; } 66 76 public MemoryStatus MemoryStatus { get; set; } 77 public TimeStatus TimeStatus { get; set; } 67 78 public IEnumerable<TaskStatus> TasksStatus { get; set; } 68 79 public IEnumerable<SlaveStatus> SlavesStatus { get; set; } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/history/history.cshtml
r12435 r12516 56 56 <div class="panel-body"> 57 57 <flot dataset="coreSeries" options="fillChartOptions"></flot> 58 <p>{{maxUpper}}</p>59 <p>{{fromDateTime}}</p>60 <p>{{toDateTime}}</p>61 58 </div> 62 59 </div>
Note: See TracChangeset
for help on using the changeset viewer.