Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/14/13 10:24:01 (11 years ago)
Author:
pfleck
Message:

#2063:
Added zooming in charts.
Used memory is displayed in GB.

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  
    2727
    2828namespace HeuristicLab.Services.Hive.Statistics.Controllers {
     29  //[OutputCache(Duration = 60 * 5)]
    2930  public class ChartDataController : Controller {
    3031    private static readonly TimeSpan DefaultDuration = new TimeSpan(1, 0, 0, 0);
     
    7172          };
    7273
     74        // Return values in GB
    7375        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),
    7577          JsonRequestBehavior.AllowGet);
    7678      }
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/HomeController.cs

    r9625 r9628  
    2929  public class HomeController : Controller {
    3030    public ActionResult Index() {
    31       OverallStatus result = null;
    32 
    3331      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) {
    3432        var onlineSlaves = (from slave in db.Resources.OfType<Slave>()
     
    3735                           .ToList();
    3836
    39         result = new OverallStatus {
     37        var result = new OverallStatus {
    4038          OverallCurrentlyAvailableCores = onlineSlaves.Sum(s => s.Cores ?? 0),
    4139          CurrentlyAvailableCores = onlineSlaves.Where(s => s.IsAllowedToCalculate).Sum(s => s.Cores ?? 0),
     
    4947                                    : 0.0
    5048        };
     49
     50
     51        return View(result);
    5152      }
    52 
    53       return View(result);
    5453    }
    5554
Note: See TracChangeset for help on using the changeset viewer.