summaryrefslogblamecommitdiffstats
path: root/modules-available/statistics/templates/cpumodels.html
blob: 2f24cd92da6b4f4f8d1cc3aff0a163dcfd047b7d (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                           
                                           





                                                                                           
                                                                                   
                                                                                                     
                                                                                                       


                                                                



                                                                                                                                                                      










                                                                                                            
                                                                                                                                        


                                                                                                                  
                                                                                                                   
                                                                                       












                                                                                                    
      
<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">
						<tr>
							<th>{{lang_modelName}}</th>
							<th class="text-right">{{lang_cpuCores}}</th>
							<th class="text-right">{{lang_modelCount}}</th>
						</tr>
						{{#rows}}
						<tr id="{{id}}">
							<td class="text-left slx-nowrap">
								<a href="?do=Statistics&amp;filter=systemmodel&amp;argument={{urlsystemmodel}}">{{systemmodel}}</a>
							</td>
							<td class="text-right"><a href="?do=Statistics&amp;filter=realcores&amp;argument={{cores}}">{{cores}}</a></td>
							<td class="text-right">{{count}}</td>
						</tr>
						{{/rows}}
					</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('info');
									if (!tooltip) {
										sel = false;
										return;
									}
									sel = $('#' + tooltip.text);
									sel.addClass('info');
								}
							});
						}, false);
					</script>
				</div>
			</div>
		</div>
	</div>
</div>