diff options
author | Simon Rettberg | 2016-02-15 18:33:37 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-02-15 18:33:37 +0100 |
commit | 6821a5f066b8e2a5648c0eabf1322749300d28c3 (patch) | |
tree | d61b1fd3e2e91532dceed824ae03513430f037b6 /templates/statistics | |
parent | [ad/ldap] Fallback to default ports if working on old config (diff) | |
download | slx-admin-6821a5f066b8e2a5648c0eabf1322749300d28c3.tar.gz slx-admin-6821a5f066b8e2a5648c0eabf1322749300d28c3.tar.xz slx-admin-6821a5f066b8e2a5648c0eabf1322749300d28c3.zip |
[statistics] Smart values, show last log lines, location support
Diffstat (limited to 'templates/statistics')
-rw-r--r-- | templates/statistics/cpumodels.html | 16 | ||||
-rw-r--r-- | templates/statistics/machine-hdds.html | 14 | ||||
-rw-r--r-- | templates/statistics/summary.html | 17 | ||||
-rw-r--r-- | templates/statistics/syslog.html | 43 |
4 files changed, 80 insertions, 10 deletions
diff --git a/templates/statistics/cpumodels.html b/templates/statistics/cpumodels.html index f98b89db..2f24cd92 100644 --- a/templates/statistics/cpumodels.html +++ b/templates/statistics/cpumodels.html @@ -1,21 +1,23 @@ <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> - {{lang_cpuStats}} + {{lang_modelStats}} </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>{{lang_modelName}}</th> <th class="text-right">{{lang_cpuCores}}</th> - <th class="text-right">{{lang_cpuCount}}</th> + <th class="text-right">{{lang_modelCount}}</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-left slx-nowrap"> + <a href="?do=Statistics&filter=systemmodel&argument={{urlsystemmodel}}">{{systemmodel}}</a> + </td> + <td class="text-right"><a href="?do=Statistics&filter=realcores&argument={{cores}}">{{cores}}</a></td> <td class="text-right">{{count}}</td> </tr> {{/rows}} @@ -27,7 +29,7 @@ document.addEventListener("DOMContentLoaded", function() { var data = {{{json}}}; var sel = false; - new Chart(document.getElementById('cpumodelchart').getContext('2d')).Pie(data, { + new Chart(document.getElementById('cpumodelchart').getContext('2d')).Pie(data, { animation: false, tooltipTemplate: "<%if (label){%><%=label%><%}%>", customTooltips: function(tooltip) { @@ -46,4 +48,4 @@ </div> </div> </div> -</div>
\ No newline at end of file +</div> diff --git a/templates/statistics/machine-hdds.html b/templates/statistics/machine-hdds.html index cb3cbffc..fd6cf1be 100644 --- a/templates/statistics/machine-hdds.html +++ b/templates/statistics/machine-hdds.html @@ -4,9 +4,21 @@ <div class="col-md-6"> <div class="panel panel-default"> <div class="panel-heading"> - {{dev}} + <b>{{s_ModelFamily}}</b> {{dev}} </div> <div class="panel-body"> + {{#s_DeviceModel}} + <div>{{lang_modelNo}}: {{s_DeviceModel}}, {{lang_serialNo}}: {{s_SerialNumber}}</div> + {{/s_DeviceModel}} + {{#s_ReallocatedSectorCt}} + <div class="red">{{lang_reallocatedSectors}}: {{s_ReallocatedSectorCt}}</div> + {{/s_ReallocatedSectorCt}} + {{#s_CurrentPendingSector}} + <div class="red">{{lang_pendingSectors}}: {{s_CurrentPendingSector}}</div> + {{/s_CurrentPendingSector}} + {{#s_PowerOnHours}} + <div>{{lang_powerOnTime}}: {{s_PowerOnHours}} {{lang_hours}} ({{PowerOnTime}})</div> + {{/s_PowerOnHours}} <div class="row"> <div class="col-sm-6"> <table class="table table-condensed table-striped table-responsive"> diff --git a/templates/statistics/summary.html b/templates/statistics/summary.html index fb6466fc..5f16fd89 100644 --- a/templates/statistics/summary.html +++ b/templates/statistics/summary.html @@ -3,8 +3,8 @@ <div class="panel-body"> <div> {{lang_knownMachines}}: <b>{{known}}</b>  - {{lang_onlineMachines}}: <b>{{online}}</b>  - {{lang_inUseMachines}}: <b>{{used}}</b> (<b>{{usedpercent}}%</b>) + <a href="?do=Statistics&filter=state&argument=on">{{lang_onlineMachines}}</a>: <b>{{online}}</b>  + <a href="?do=Statistics&filter=state&argument=occupied">{{lang_inUseMachines}}</a>: <b>{{used}}</b> (<b>{{usedpercent}}%</b>) </div> {{#badhdd}} <div> @@ -16,5 +16,18 @@ {{/badhdd}} </div> </div> + <div> + <canvas id="usagehist" style="width:100%;height:150px"></canvas> + <script type="text/javascript"> + document.addEventListener("DOMContentLoaded", function() { + var data = {{{json}}}; + var sel = false; + new Chart(document.getElementById('usagehist').getContext('2d')).Line(data, { + animation: false, + pointHitDetectionRadius: 5 + }); + }, false); + </script> + </div> </div> diff --git a/templates/statistics/syslog.html b/templates/statistics/syslog.html new file mode 100644 index 00000000..c82cb8ac --- /dev/null +++ b/templates/statistics/syslog.html @@ -0,0 +1,43 @@ +<h3>{{lang_logHeadline}}</h3> +<table class="table table-striped table-condensed"> + <thead> + <th width="1"></th> + <th>{{lang_when}}</th> + <th>{{lang_event}}</th> + <th width="1">{{lang_details}}</th> + </thead> + <tbody> + {{#list}} + <tr> + <td><span class="glyphicon {{icon}}" title="{{logtypeid}}" onclick="$('#filterstring').tagsinput('add', '{{logtypeid}}')"></span></td> + <td class="text-right" nowrap="nowrap">{{date}}</td> + <td>{{description}}</td> + <td>{{#extra}} + <a class="btn btn-default btn-xs pull-left" onclick="$('#details-body').html($('#extra-{{logid}}').html())" data-toggle="modal" data-target="#myModal">»</a> + <div class="hidden" id="extra-{{logid}}">{{extra}}</div> + {{/extra}}</td> + </tr> + {{/list}} + </tbody> +</table> +<div class="pull-right"><a class="btn btn-default btn-sm" href="?do=SysLog&ip={{clientip}}">{{lang_more}} »</a></div> +<div class="clearfix"></div> + +<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> + <h4 class="modal-title" id="myModalLabel">{{lang_details}}</h4> + </div> + <div class="modal-body"> + <pre id="details-body"></pre> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> + </div> + </div> + </div> +</div> + + |