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
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() {
    221    <script>
    322        var ajaxDataRenderer = function (url, plot, options) {
     
    2544                show: true,
    2645                sizeAdjust: 7.5
     46            },
     47            seriesDefaults: {
     48                markerOptions: { show: false },
     49                //fill: true
    2750            },
    2851            dataRenderer: ajaxDataRenderer,
     
    5275            cursor: {
    5376                show: true,
    54                 tooltipLocation:'sw'
     77                showTooltip: false,
     78                zoom: true,
     79                looseZoom: true,
     80                clickReset: false,
     81                dblClickReset: false,
     82                constrainZoomTo: 'x'
    5583            }
    5684        });
     
    5886        @(destinationTag)Plot.replot( {resetAxes:true} );
    5987       
     88        $('#@destinationTag').contextmenu(function() {
     89            @(destinationTag)Plot.resetZoom();
     90            @(destinationTag)Plot.replot( {resetAxes: true} );
     91            return false;
     92        });
     93       
    6094        $(window).resize(function() {
    61             @(destinationTag)Plot.replot( {resetAxes:true} );
     95            @(destinationTag)Plot.replot( {resetAxes: true} );
    6296        });
    6397    </script>
  • 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
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/HeuristicLab.Services.Hive.Statistics-3.3.csproj

    r9625 r9628  
    110110    <Compile Include="Controllers\ChartDataController.cs" />
    111111    <Compile Include="Controllers\HomeController.cs" />
    112     <Compile Include="Helper\HtmlChartHelper.cs" />
    113112    <Compile Include="Models\OverallStatistics.cs" />
    114113    <Compile Include="Global.asax.cs">
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml

    r9625 r9628  
    6666        "UsedMemory",
    6767        Url.Action("UsedMemory", "ChartData"),
    68         title: "Memory / Used Memory",
     68        title: "Memory / Used Memory (GB)",
    6969        minY: 0)
    7070}
Note: See TracChangeset for help on using the changeset viewer.