1 | @model HeuristicLab.Services.Hive.Statistics.Models.OverallStatus
|
---|
2 |
|
---|
3 | @{
|
---|
4 | ViewBag.Title = "Status Monitor";
|
---|
5 | }
|
---|
6 |
|
---|
7 | <h1>Current Status</h1>
|
---|
8 | <section class="currentStats">
|
---|
9 | <table>
|
---|
10 | <tr>
|
---|
11 | <td>Overall Available Cores</td>
|
---|
12 | <td>@Model.OverallCurrentlyAvailableCores</td>
|
---|
13 | <td>System-wide Waiting Tasks</td>
|
---|
14 | <td>@Model.CurrentlyJobsWaiting</td>
|
---|
15 | </tr>
|
---|
16 | <tr>
|
---|
17 | <td>Real Available Cores</td>
|
---|
18 | <td>@Model.CurrentlyAvailableCores</td>
|
---|
19 | <td>Overall Average CPU Utilization</td>
|
---|
20 | <td>@Model.OverallCpuUtilization</td>
|
---|
21 | </tr>
|
---|
22 | <tr>
|
---|
23 | <td>Used Cores</td>
|
---|
24 | <td>@Model.CurrentlyUsedCores</td>
|
---|
25 | <td>Real Average CPU Utilization</td>
|
---|
26 | <td>@Model.AvailableCpuUtilization</td>
|
---|
27 | </tr>
|
---|
28 | </table>
|
---|
29 | </section>
|
---|
30 | <section class="chartContainer">
|
---|
31 | <h1 class="title">Current Hive Status</h1>
|
---|
32 | <button class="collapse">-</button>
|
---|
33 | <div id="CurrentCPUUtilization"></div>
|
---|
34 | <div id="CurrentTotalUsedCores"></div>
|
---|
35 | <div id="CurrentTotalUsedMemory"></div>
|
---|
36 | </section>
|
---|
37 | <section class="chartContainer">
|
---|
38 | <h1 class="title">Historic Hive Status</h1>
|
---|
39 | <button class="collapse">-</button>
|
---|
40 | <fieldset>
|
---|
41 | <legend>Range</legend>
|
---|
42 | <label>Start</label>
|
---|
43 | @Html.TextBox("Start", (DateTime.Now - new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" })
|
---|
44 | <label>End</label>
|
---|
45 | @Html.TextBox("End", (DateTime.Now + new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" })
|
---|
46 | <button id="Refresh">Refresh</button>
|
---|
47 | </fieldset>
|
---|
48 | <div id="AverageCpuUtilization"></div>
|
---|
49 | <div id="UsedCores"></div>
|
---|
50 | <div id="UsedMemory"></div>
|
---|
51 | </section>
|
---|
52 |
|
---|
53 | @section Styles {
|
---|
54 | @Styles.Render("~/Styles/jqPlot/jquery.jqplot")
|
---|
55 | @Styles.Render("~/Content/themes/base/css")
|
---|
56 | }
|
---|
57 |
|
---|
58 | @section Scripts {
|
---|
59 | @Scripts.Render("~/bundles/jqueryui")
|
---|
60 | @Scripts.Render("~/Scripts/smoothie.js")
|
---|
61 | @Scripts.Render("~/Scripts/SmoothieChartResize.js")
|
---|
62 | @Scripts.Render("~/Scripts/CollapsingSection.js")
|
---|
63 | <script>
|
---|
64 | $("#Refresh").button({
|
---|
65 | icons: {
|
---|
66 | primary: "ui-icon-refresh"
|
---|
67 | }
|
---|
68 | });
|
---|
69 | </script>
|
---|
70 |
|
---|
71 | @Scripts.Render("~/Scripts/jqPlot/jquery.jqplot")
|
---|
72 | @Scripts.Render("~/Scripts/jqPlot/plugins/jqplot.barRenderer.min.js")
|
---|
73 | @Scripts.Render("~/Scripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js")
|
---|
74 | @Scripts.Render("~/Scripts/jqPlot/plugins/jqplot.pointLabels.min.js")
|
---|
75 | @ChartHelper.AjaxDataRenderer()
|
---|
76 |
|
---|
77 | @ChartHelper.LineChartTime(
|
---|
78 | "AverageCpuUtilization",
|
---|
79 | Url.Action("AverageCpuUtilization", "ChartData"),
|
---|
80 | title: "Avg. CPU Utilization History of all Slaves",
|
---|
81 | axisYFormat: "%.2f%%",
|
---|
82 | minY: 0, maxY: 100)
|
---|
83 |
|
---|
84 | @ChartHelper.LineChartTime(
|
---|
85 | "UsedCores",
|
---|
86 | Url.Action("UsedCores", "ChartData"),
|
---|
87 | title: "Cores / Used Cores",
|
---|
88 | minY: 0)
|
---|
89 |
|
---|
90 | @ChartHelper.LineChartTime(
|
---|
91 | "UsedMemory",
|
---|
92 | Url.Action("UsedMemory", "ChartData"),
|
---|
93 | title: "Memory / Used Memory (GB)",
|
---|
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 | @ChartHelper.UserTasks(Url.Action("UserTasks", "ChartData"), "section.currentStats", "Calculating");
|
---|
108 | @ChartHelper.UserTasks(Url.Action("UserTasks", "ChartData"), "section.currentStats", "Waiting");
|
---|
109 | });
|
---|
110 |
|
---|
111 | function RefreshCharts() {
|
---|
112 | var startDate = $('#Start').val();
|
---|
113 | var endDate = $('#End').val();
|
---|
114 |
|
---|
115 | @ChartHelper.RefreshChart("AverageCpuUtilization", Url.Action("AverageCpuUtilization", "ChartData"), "startDate", "endDate",0,100)
|
---|
116 | @ChartHelper.RefreshChart("UsedCores", Url.Action("UsedCores", "ChartData"), "startDate", "endDate",0)
|
---|
117 | @ChartHelper.RefreshChart("UsedMemory", Url.Action("UsedMemory", "ChartData"), "startDate", "endDate",0)
|
---|
118 | }
|
---|
119 |
|
---|
120 | $(document).ready(function () {
|
---|
121 | @ChartHelper.SetStreamingProperties(1000,20,10)
|
---|
122 |
|
---|
123 | @ChartHelper.CreateStreamChart("CurrentCPU", "CurrentCPUUtilization",Url.Action("CurrentCpuUtilization","ChartData"),"Current CPU Utilization","%.2f%%",100.00)
|
---|
124 | @ChartHelper.CreateStreamChart("CurrentCores", "CurrentTotalUsedCores",Url.Action("CurrentCores","ChartData"),"Current Total vs. Used Cores")
|
---|
125 | @ChartHelper.CreateStreamChart("CurrentMemory", "CurrentTotalUsedMemory",Url.Action("CurrentMemory","ChartData"),"Current Total vs. Used Memory")
|
---|
126 |
|
---|
127 | function DoUpdate() {
|
---|
128 | @ChartHelper.UpdateStreamChart("CurrentCPU","CurrentCPUUtilization", Url.Action("CurrentCpuUtilization","ChartData"),"FixedY")
|
---|
129 | @ChartHelper.UpdateStreamChart("CurrentCores","CurrentTotalUsedCores", Url.Action("CurrentCores","ChartData"))
|
---|
130 | @ChartHelper.UpdateStreamChart("CurrentMemory","CurrentTotalUsedMemory", Url.Action("CurrentMemory","ChartData"))
|
---|
131 | setTimeout(DoUpdate, refreshRate);
|
---|
132 | }
|
---|
133 |
|
---|
134 | DoUpdate();
|
---|
135 |
|
---|
136 | });
|
---|
137 | </script>
|
---|
138 | }
|
---|