Changeset 9628 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers
- Timestamp:
- 06/14/13 10:24:01 (11 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs
r9625 r9628 27 27 28 28 namespace HeuristicLab.Services.Hive.Statistics.Controllers { 29 //[OutputCache(Duration = 60 * 5)] 29 30 public class ChartDataController : Controller { 30 31 private static readonly TimeSpan DefaultDuration = new TimeSpan(1, 0, 0, 0); … … 71 72 }; 72 73 74 // Return values in GB 73 75 return Json( 74 CreateSeriesData(data.ToList(), x => x.Time, x => x.UsedMemory , x => x.TotalMemory),76 CreateSeriesData(data.ToList(), x => x.Time, x => x.UsedMemory / 1000, x => x.TotalMemory / 1000), 75 77 JsonRequestBehavior.AllowGet); 76 78 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/HomeController.cs
r9625 r9628 29 29 public class HomeController : Controller { 30 30 public ActionResult Index() { 31 OverallStatus result = null;32 33 31 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) { 34 32 var onlineSlaves = (from slave in db.Resources.OfType<Slave>() … … 37 35 .ToList(); 38 36 39 result = new OverallStatus {37 var result = new OverallStatus { 40 38 OverallCurrentlyAvailableCores = onlineSlaves.Sum(s => s.Cores ?? 0), 41 39 CurrentlyAvailableCores = onlineSlaves.Where(s => s.IsAllowedToCalculate).Sum(s => s.Cores ?? 0), … … 49 47 : 0.0 50 48 }; 49 50 51 return View(result); 51 52 } 52 53 return View(result);54 53 } 55 54
Note: See TracChangeset
for help on using the changeset viewer.