blob: d9b0298b896ce3566f65f543bc718414f8abc674 (
plain) (
tree)
|
|
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
{{lang_modelStats}}
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-8">
<table class="table table-condensed table-striped table-responsive">
<tr>
<th>{{lang_modelName}}</th>
<th class="text-right text-nowrap">{{lang_cpuCores}}</th>
<th class="text-right text-nowrap">{{lang_modelCount}}</th>
</tr>
{{#rows}}
<tr id="{{id}}" class="{{collapse}}">
<td class="text-left text-nowrap filter-col" data-filter-col="systemmodel">
<table style="width:100%; table-layout: fixed;"><tr><td style="overflow:hidden;text-overflow: ellipsis;">
<a class="filter-val" data-filter-val="{{systemmodel}}" href="?do=Statistics&show=stat&filters={{query}}~,~systemmodel={{urlsystemmodel}}">{{systemmodel}}</a>
</td></tr></table>
</td>
<td class="text-right filter-col" data-filter-col="realcores">
<a class="filter-val" data-filter-val="{{cores}}" href="?do=Statistics&show=stat&filters={{query}}~,~realcores={{cores}}">{{cores}}</a>
</td>
<td class="text-right">{{count}}</td>
</tr>
{{/rows}}
<tr class="slx-decollapse">
<td colspan="3">
<span class="btn-group btn-group-justified">
<span class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-menu-down"></span>
</span>
</span>
</td>
</tr>
</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>
</div>
</div>
</div>
|