summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/templates/machine-hdds.html
diff options
context:
space:
mode:
authorSimon Rettberg2016-05-03 19:03:09 +0200
committerSimon Rettberg2016-05-03 19:03:09 +0200
commit50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66 (patch)
tree05e99fdffa696434960d7c77966c0bc36d6339e8 /modules-available/statistics/templates/machine-hdds.html
parentSecond half of merge.... (diff)
downloadslx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.gz
slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.xz
slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.zip
WIP
Diffstat (limited to 'modules-available/statistics/templates/machine-hdds.html')
-rw-r--r--modules-available/statistics/templates/machine-hdds.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/modules-available/statistics/templates/machine-hdds.html b/modules-available/statistics/templates/machine-hdds.html
new file mode 100644
index 00000000..fd6cf1be
--- /dev/null
+++ b/modules-available/statistics/templates/machine-hdds.html
@@ -0,0 +1,67 @@
+<h3>{{lang_hdds}}</h3>
+<div class="row">
+ {{#hdds}}
+ <div class="col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <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}}&thinsp;{{lang_hours}} ({{PowerOnTime}})</div>
+ {{/s_PowerOnHours}}
+ <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 (sel !== false) sel.removeClass('info');
+ if (!tooltip) {
+ sel = false;
+ return;
+ }
+ sel = $('#' + tooltip.text);
+ sel.addClass('info');
+ }
+ });
+ }, false);
+ </script>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {{/hdds}}
+</div> \ No newline at end of file