- Timestamp:
- 12/11/12 16:27:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3/Status.aspx.cs
r9023 r9025 44 44 Dictionary<Guid, int> calculatingTasksByUser = new Dictionary<Guid,int>(); 45 45 Dictionary<Guid, int> waitingTasksByUser = new Dictionary<Guid, int>(); 46 List<DT.Resource> groups = new List<DT.Resource>(); 47 48 transactionManager.UseTransaction(() => { 49 groups = dao.GetResources(x => x.ResourceType == "GROUP").ToList(); 50 }, false, false); 46 51 47 52 if (!string.IsNullOrEmpty(resourceName)) { … … 76 81 77 82 slavesLabel.Text = string.Join(", ", onlineSlaves.Select(x => string.Format("<a href=\"?resource={0}\">{0}</a> ({1} %)", x.Name, Math.Round(x.CpuUtilization, 2)))); 83 groupsLabel.Text = string.Join(", ", groups.Select(x => string.Format("<a href=\"?resource={0}\">{0}</a>", x.Name))); 78 84 79 85 overallCpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %"; 80 cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";86 cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 && onlineSlaves.Where(x => x.IsAllowedToCalculate).Count() > 0 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %"; 81 87 82 88 DT.Statistics[] stats = new DT.Statistics[0];
Note: See TracChangeset
for help on using the changeset viewer.