diff options
Diffstat (limited to 'modules-available/statistics/templates/cpumodels.html')
-rw-r--r-- | modules-available/statistics/templates/cpumodels.html | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/modules-available/statistics/templates/cpumodels.html b/modules-available/statistics/templates/cpumodels.html index 91464031..e133bec6 100644 --- a/modules-available/statistics/templates/cpumodels.html +++ b/modules-available/statistics/templates/cpumodels.html @@ -16,7 +16,7 @@ </thead> <tbody> {{#rows}} - <tr id="{{id}}" class="{{collapse}}"> + <tr id="sysmdl-{{idx}}" class="{{collapse}}"> <td data-sort-value="{{systemmodel}}" class="text-left text-nowrap filter-col" data-filter-col="systemmodel"> <table class="slx-ellipsis"><tr><td> <a class="filter-val" data-filter-val="{{systemmodel}}" href="#">{{systemmodel}}</a> @@ -40,28 +40,7 @@ </tbody> </table> </div> - <div class="col-md-4"> - <canvas id="cpumodelchart" style="width:100%;height:380px"></canvas> - <script type="text/javascript"> - document.addEventListener("DOMContentLoaded", function() { - var data = {{{json}}}; - var sel = false; - new Chart(document.getElementById('cpumodelchart').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 = $('#' + tooltip.text); - sel.addClass('slx-bold'); - } - }); - }, false); - </script> - </div> + <div class="col-md-4 auto-chart" data-chart="{{json}}" data-chart-dest="#sysmdl-"></div> </div> </div> </div> |