Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/13/13 17:50:00 (11 years ago)
Author:
pfleck
Message:

#2063:
Insert charts on index page for CPU utilization, cores and memory usage.
Added html helper for generating chart javascript.
Added ChartDataController for generating JSON data for the charts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml

    r9617 r9625  
    1818        </tr>
    1919        <tr>
     20            <td>Used Cores</td>
     21            <td>@Model.CurrentlyUsedCores</td>
     22        </tr>
     23        <tr>
    2024            <td>System-Wide Waiting Tasks</td>
    2125            <td>@Model.CurrentlyJobsWaiting</td>
    22         </tr>
    23         <tr>
    24             <td>Used Cores</td>
    25             <td>@Model.CurrentlyUsedCores</td>
    2626        </tr>
    2727        <tr>
     
    3636</section>
    3737
    38 <section>
    39     <div id="chartdiv" style="height:400px;width:300px;"></div>
     38<section class="charts">
     39    <div id="AverageCpuUtilization"></div>
     40    <div id="UsedCores"></div>
     41    <div id="UsedMemory"></div>
    4042</section>
    4143
    4244@section Styles {
    43     @Styles.Render("~/Scripts/jqPlot/jquery.jqplot")
     45    @Styles.Render("~/Styles/jqPlot/jquery.jqplot")
    4446}
    4547
    4648@section Scripts {
    4749    @Scripts.Render("~/Scripts/jqPlot/jquery.jqplot")
    48     <script>
    49         $.jqplot('chartdiv', [[[1, 2], [3, 5.12], [5, 13.1], [7, 33.6], [9, 85.9], [11, 219.9]]]);
    50     </script>
     50    @ChartHelper.AjaxDataRenderer()
     51
     52    @ChartHelper.LineChartTime(
     53        "AverageCpuUtilization",
     54        Url.Action("AverageCpuUtilization", "ChartData"),
     55        title: "Avg. CPU Utilization History of all Slaves",
     56        axisYFormat: "%.2f%%",
     57        minY: 0, maxY: 100)
     58
     59    @ChartHelper.LineChartTime(
     60        "UsedCores",
     61        Url.Action("UsedCores", "ChartData"),
     62        title: "Cores / Used Cores",
     63        minY: 0)
     64
     65    @ChartHelper.LineChartTime(
     66        "UsedMemory",
     67        Url.Action("UsedMemory", "ChartData"),
     68        title: "Memory / Used Memory",
     69        minY: 0)
    5170}
Note: See TracChangeset for help on using the changeset viewer.