Changeset 9643 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home
- Timestamp:
- 06/18/13 17:24:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml
r9628 r9643 36 36 </section> 37 37 38 <fieldset> 39 <legend>Range</legend> 40 <ol> 41 <li>Start</li> 42 <li> 43 @Html.TextBox("Start", (DateTime.Now - new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" }) 44 </li> 45 <li>End</li> 46 <li> 47 @Html.TextBox("End", DateTime.Now.ToString("yyyy-MM-dd"), new { @class = "date" }) 48 </li> 49 </ol> 50 <button id="refresh">Refresh</button> 51 </fieldset> 52 38 53 <section class="charts"> 39 54 <div id="AverageCpuUtilization"></div> … … 44 59 @section Styles { 45 60 @Styles.Render("~/Styles/jqPlot/jquery.jqplot") 61 @Styles.Render("~/Content/themes/base/css") 46 62 } 47 63 48 64 @section Scripts { 65 @Scripts.Render("~/bundles/jqueryui") 66 <script> 67 $("#refresh").button({ 68 icons: { 69 primary: "ui-icon-refresh" 70 } 71 }); 72 </script> 73 49 74 @Scripts.Render("~/Scripts/jqPlot/jquery.jqplot") 50 75 @ChartHelper.AjaxDataRenderer() … … 68 93 title: "Memory / Used Memory (GB)", 69 94 minY: 0) 95 96 <script> 97 $(document).ready(function () { 98 $(".date").datepicker({ 99 dateFormat: "yy-mm-dd", 100 onSelect: function () { refreshCharts(); } 101 }); 102 103 $("#refresh").click(function() { 104 refreshCharts(); 105 }); 106 107 108 }); 109 110 function refreshCharts() { 111 var startDate = $('#Start').val(); 112 var endDate = $('#End').val(); 113 114 @* 115 var url = "@Url.Action("AverageCpuUtilization", "ChartData")?start=" + startDate + "&end" + endDate; 116 117 @ChartHelper.LineChartTime( 118 "AverageCpuUtilization", 119 "url", 120 title: "Avg. CPU Utilization History of all Slaves", 121 axisYFormat: "%.2f%%", 122 minY: 0, maxY: 100) 123 *@ 124 125 @ChartHelper.RefreshChart("AverageCpuUtilization", Url.Action("AverageCpuUtilization", "ChartData"), "startDate", "endDate") 126 @ChartHelper.RefreshChart("UsedCores", Url.Action("UsedCores", "ChartData"), "startDate", "endDate") 127 @ChartHelper.RefreshChart("UsedMemory", Url.Action("UsedMemory", "ChartData"), "startDate", "endDate") 128 } 129 </script> 70 130 }
Note: See TracChangeset
for help on using the changeset viewer.