Changeset 9628 for branches/HiveStatistics/sources
- Timestamp:
- 06/14/13 10:24:01 (12 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml
r9625 r9628 1 @helper AjaxDataRenderer() { 1 @* HeuristicLab 2 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 3 * 4 * This file is part of HeuristicLab. 5 * 6 * HeuristicLab is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * HeuristicLab is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 18 *@ 19 20 @helper AjaxDataRenderer() { 2 21 <script> 3 22 var ajaxDataRenderer = function (url, plot, options) { … … 25 44 show: true, 26 45 sizeAdjust: 7.5 46 }, 47 seriesDefaults: { 48 markerOptions: { show: false }, 49 //fill: true 27 50 }, 28 51 dataRenderer: ajaxDataRenderer, … … 52 75 cursor: { 53 76 show: true, 54 tooltipLocation:'sw' 77 showTooltip: false, 78 zoom: true, 79 looseZoom: true, 80 clickReset: false, 81 dblClickReset: false, 82 constrainZoomTo: 'x' 55 83 } 56 84 }); … … 58 86 @(destinationTag)Plot.replot( {resetAxes:true} ); 59 87 88 $('#@destinationTag').contextmenu(function() { 89 @(destinationTag)Plot.resetZoom(); 90 @(destinationTag)Plot.replot( {resetAxes: true} ); 91 return false; 92 }); 93 60 94 $(window).resize(function() { 61 @(destinationTag)Plot.replot( {resetAxes: true} );95 @(destinationTag)Plot.replot( {resetAxes: true} ); 62 96 }); 63 97 </script> -
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 -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/HeuristicLab.Services.Hive.Statistics-3.3.csproj
r9625 r9628 110 110 <Compile Include="Controllers\ChartDataController.cs" /> 111 111 <Compile Include="Controllers\HomeController.cs" /> 112 <Compile Include="Helper\HtmlChartHelper.cs" />113 112 <Compile Include="Models\OverallStatistics.cs" /> 114 113 <Compile Include="Global.asax.cs"> -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml
r9625 r9628 66 66 "UsedMemory", 67 67 Url.Action("UsedMemory", "ChartData"), 68 title: "Memory / Used Memory ",68 title: "Memory / Used Memory (GB)", 69 69 minY: 0) 70 70 }
Note: See TracChangeset
for help on using the changeset viewer.