diff options
Diffstat (limited to 'modules-available/statistics/templates/machine-hdds.html')
-rw-r--r-- | modules-available/statistics/templates/machine-hdds.html | 76 |
1 files changed, 37 insertions, 39 deletions
diff --git a/modules-available/statistics/templates/machine-hdds.html b/modules-available/statistics/templates/machine-hdds.html index b839dfca..57786510 100644 --- a/modules-available/statistics/templates/machine-hdds.html +++ b/modules-available/statistics/templates/machine-hdds.html @@ -4,21 +4,27 @@ <div class="col-md-6"> <div class="panel panel-default"> <div class="panel-heading"> - <b>{{s_ModelFamily}}</b> {{dev}} + <b>{{model_family}}{{^model_family}}{{model}}{{/model_family}}</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}} + {{#model}} + <div>{{lang_modelNo}}: {{model}}, {{lang_serialNo}}: {{serial_number}}</div> + {{/model}} + {{#smart_status_failed}} + <div class="red">{{lang_smartSelfTestFailed}}</div> + {{/smart_status_failed}} + {{#attr_5.raw}} + <div class="red">{{lang_reallocatedSectors}}: {{attr_5.raw}}</div> + {{/attr_5.raw}} + {{#attr_197.raw}} + <div class="red">{{lang_pendingSectors}}: {{attr_197.raw}}</div> + {{/attr_197.raw}} + {{#PowerOnTime}} + <div>{{lang_powerOnTime}}: {{PowerOnTime}}</div> + {{/PowerOnTime}} + {{#media_errors}} + <div class="red">{{lang_mediaIntegrityErrors}}: {{media_errors}}</div> + {{/media_errors}} <div class="row"> <div class="col-sm-7"> <table class="table table-condensed table-striped table-responsive"> @@ -28,40 +34,32 @@ <th>{{lang_partType}}</th> </tr> {{#partitions}} - <tr id="{{id}}"> - <td>{{name}}</td> - <td class="text-right text-nowrap">{{size}} GiB</td> - <td>{{type}}</td> + <tr id="part-{{hddidx}}-{{idx}}"> + <td>{{index}}</td> + <td class="text-right text-nowrap">{{size_s}}</td> + <td class="text-nowrap"> + <table class="slx-ellipsis"><tr><td>{{name}}</td></tr></table> + </td> </tr> {{/partitions}} </table> - <div class="slx-bold">{{lang_total}}: {{size}} GiB</div> + <div class="slx-bold">{{lang_total}}: {{size_s}}</div> + {{#unused_s}} + <div class="slx-bold">{{lang_unused}}: {{unused_s}}</div> + {{/unused_s}} </div> - <div class="col-sm-5"> - <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 class="col-sm-5 auto-chart" data-chart="{{json}}" data-chart-dest="#part-{{hddidx}}-"> </div> </div> </div> </div> </div> {{/hdds}} + <script type="text/javascript"> + document.addEventListener("DOMContentLoaded", function() { + $('.auto-chart').each(function() { + makePieChart($(this)); + }); + }); + </script> </div>
\ No newline at end of file |