summaryrefslogtreecommitdiffstats
path: root/templates/statistics/machine-hdds.html
diff options
context:
space:
mode:
authorSimon Rettberg2015-11-19 12:13:36 +0100
committerSimon Rettberg2015-11-19 12:13:36 +0100
commit66aac2e67e35bd987bc3750b63f2734e47d0d57d (patch)
treeb9881051c3587a00fa56972c6b449731689cdd68 /templates/statistics/machine-hdds.html
parent[request.inc.php] Add optional parameter to control variable type (diff)
downloadslx-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/machine-hdds.html')
-rw-r--r--templates/statistics/machine-hdds.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/templates/statistics/machine-hdds.html b/templates/statistics/machine-hdds.html
new file mode 100644
index 00000000..98cf65c5
--- /dev/null
+++ b/templates/statistics/machine-hdds.html
@@ -0,0 +1,55 @@
+<h3>{{lang_hdds}}</h3>
+<div class="row">
+ {{#hdds}}
+ <div class="col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{dev}}
+ </div>
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-6">
+ <table class="table table-condensed table-striped table-responsive">
+ <tr>
+ <th>{{lang_partName}}</th>
+ <th class="text-right">{{lang_partSize}}</th>
+ <th>{{lang_partType}}</th>
+ </tr>
+ {{#partitions}}
+ <tr id="{{id}}">
+ <td>{{name}}</td>
+ <td class="text-right">{{size}}&thinsp;GiB</td>
+ <td>{{type}}</td>
+ </tr>
+ {{/partitions}}
+ </table>
+ <div class="slx-bold">{{lang_total}}: {{size}}&thinsp;GiB</div>
+ </div>
+ <div class="col-sm-6">
+ <canvas id="{{devid}}-chart" style="width:100%;height:250px"></canvas>
+ <script type="text/javascript">
+ document.addEventListener("DOMContentLoaded", function() {
+ var data = {{{json}}};
+ var sel = false;
+ new Chart(document.getElementById('{{devid}}-chart').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>
+ {{/hdds}}
+</div> \ No newline at end of file