summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/templates/id44.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/id44.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/id44.html')
-rw-r--r--modules-available/statistics/templates/id44.html48
1 files changed, 48 insertions, 0 deletions
diff --git a/modules-available/statistics/templates/id44.html b/modules-available/statistics/templates/id44.html
new file mode 100644
index 00000000..730839b1
--- /dev/null
+++ b/modules-available/statistics/templates/id44.html
@@ -0,0 +1,48 @@
+<div class="col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_tempPartStats}}
+ </div>
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-6">
+ <table class="table table-condensed table-striped">
+ <tr>
+ <th>{{lang_partitionSize}}</th>
+ <th class="text-right">{{lang_machineCount}}</th>
+ </tr>
+ {{#rows}}
+ <tr id="tmpid{{gb}}" class="{{class}}">
+ <td class="text-left slx-nowrap"><a href="?do=Statistics&amp;filter=hddgb&amp;argument={{gb}}">{{gb}}&thinsp;GiB</td>
+ <td class="text-right">{{count}}</td>
+ </tr>
+ {{/rows}}
+ </table>
+ </div>
+ <div class="col-sm-6">
+ <canvas id="temppartchart" style="width:100%;height:250px"></canvas>
+ <script type="text/javascript">
+ document.addEventListener("DOMContentLoaded", function() {
+ var data = {{{json}}};
+ var sel = false;
+ new Chart(document.getElementById('temppartchart').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 = $('#tmpid' + String(tooltip.text));
+ console.log('#tmpid' + String(tooltip.text));
+ sel.addClass('info');
+ }
+ });
+ }, false);
+ </script>
+ </div>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file