summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/templates/id44.html
diff options
context:
space:
mode:
authorSimon Rettberg2022-07-04 18:25:06 +0200
committerSimon Rettberg2022-07-04 18:25:06 +0200
commit9ca5c9bca40fa7e962b932364228731a6b9714a8 (patch)
treeaae9463091b88826b6a931013ae6eab1935d6df6 /modules-available/statistics/templates/id44.html
parent[statistics] Add a few more RAM/HDD size groups, future is catching up.. (diff)
downloadslx-admin-9ca5c9bca40fa7e962b932364228731a6b9714a8.tar.gz
slx-admin-9ca5c9bca40fa7e962b932364228731a6b9714a8.tar.xz
slx-admin-9ca5c9bca40fa7e962b932364228731a6b9714a8.zip
[js_chart] Update to Chart.js 3.0.8
Diffstat (limited to 'modules-available/statistics/templates/id44.html')
-rw-r--r--modules-available/statistics/templates/id44.html25
1 files changed, 2 insertions, 23 deletions
diff --git a/modules-available/statistics/templates/id44.html b/modules-available/statistics/templates/id44.html
index bc549fa8..7851ba87 100644
--- a/modules-available/statistics/templates/id44.html
+++ b/modules-available/statistics/templates/id44.html
@@ -15,7 +15,7 @@
</thead>
<tbody>
{{#rows}}
- <tr id="tmpid{{gb}}" class="{{class}} {{collapse}}">
+ <tr id="id44-{{idx}}" class="{{class}} {{collapse}}">
<td data-sort-value="{{gb}}" class="text-left text-nowrap">
<a class="filter-val" data-filter-val="{{gb}}" data-filter-op="~" href="#">{{gb}}&thinsp;GiB</a>
</td>
@@ -34,28 +34,7 @@
</tbody>
</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('slx-bold');
- if (!tooltip) {
- sel = false;
- return;
- }
- sel = $('#tmpid' + String(tooltip.text));
- sel.addClass('slx-bold');
- }
- });
- }, false);
- </script>
- </div>
+ <div class="col-sm-6 auto-chart" data-chart="{{json}}" data-chart-dest="#id44-"></div>
</div>
</div>
</div>