diff options
author | Simon Rettberg | 2015-11-19 12:13:36 +0100 |
---|---|---|
committer | Simon Rettberg | 2015-11-19 12:13:36 +0100 |
commit | 66aac2e67e35bd987bc3750b63f2734e47d0d57d (patch) | |
tree | b9881051c3587a00fa56972c6b449731689cdd68 /templates/statistics/cpumodels.html | |
parent | [request.inc.php] Add optional parameter to control variable type (diff) | |
download | slx-admin-66aac2e67e35bd987bc3750b63f2734e47d0d57d.tar.gz slx-admin-66aac2e67e35bd987bc3750b63f2734e47d0d57d.tar.xz slx-admin-66aac2e67e35bd987bc3750b63f2734e47d0d57d.zip |
Implement statistics logging
DB scheme update is still missing, might still change a little...
Diffstat (limited to 'templates/statistics/cpumodels.html')
-rw-r--r-- | templates/statistics/cpumodels.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/templates/statistics/cpumodels.html b/templates/statistics/cpumodels.html new file mode 100644 index 00000000..c3d43aa4 --- /dev/null +++ b/templates/statistics/cpumodels.html @@ -0,0 +1,49 @@ +<div class="col-md-12"> + <div class="panel panel-default"> + <div class="panel-heading"> + {{lang_cpuStats}} + </div> + <div class="panel-body"> + <div class="row"> + <div class="col-md-8"> + <table class="table table-condensed table-striped"> + <tr> + <th>{{lang_cpuName}}</th> + <th class="text-right">{{lang_cpuCores}}</th> + <th class="text-right">{{lang_cpuCount}}</th> + </tr> + {{#rows}} + <tr id="{{id}}"> + <td class="text-left slx-nowrap"><a href="?do=Statistics&filter=cpumodel&argument={{urlcpumodel}}">{{cpumodel}}</a></td> + <td class="text-right"><a href="?do=Statistics&filter=realcores&argument={{realcores}}">{{realcores}}</a></td> + <td class="text-right">{{count}}</td> + </tr> + {{/rows}} + </table> + </div> + <div class="col-md-4"> + <canvas id="cpumodelchart" style="width:100%;height:380px"></canvas> + <script type="text/javascript"> + document.addEventListener("DOMContentLoaded", function() { + var data = {{{json}}}; + var sel = false; + new Chart(document.getElementById('cpumodelchart').getContext('2d')).Pie(data, { + animation: false, + tooltipTemplate: "<%if (label){%><%=label%><%}%>", + customTooltips: function(tooltip) { + if (!tooltip) { + if (sel !== false) sel.removeClass('info'); + sel = false; + return; + } + sel = $('#' + tooltip.text); + sel.addClass('info'); + } + }); + }, false); + </script> + </div> + </div> + </div> + </div> +</div>
\ No newline at end of file |