Initial commit

This commit is contained in:
Ziver Koc 2015-04-09 21:22:47 +00:00
commit aa4e110832
69 changed files with 17898 additions and 0 deletions

View file

@ -0,0 +1,39 @@
<div class="panel panel-default">
<div class="panel-heading">Cpu Status</div>
<div class="panel-body">
<div id="cpu_chart"></div>
</div>
</div>
<script language="javascript" type="text/javascript">
var cpu_data = [];
function update_cpu(data){
$(data).find("cpu").each(function() {
$(this).find("core").each(function() {
var cpu_nr = parseInt($(this).attr("id"));
if(cpu_data.length < (cpu_nr+1))
cpu_data.push( [] );
cpu_data[cpu_nr].push( [index, $(this).attr("load")] );
if(index>MAX_POINTS)
cpu_data[cpu_nr].shift();
});
});
var datasets = [];
for(i=0; i<cpu_data.length ;i++){
datasets[i] = {
label: "Cpu"+i,
data: cpu_data[i],
lines: { show: true },
points: { show: true }
};
}
var options = {
legend: { position: "ne" },
xaxis: { ticks: [] },
yaxis: { ticks: [0,20,40,60,80,100] }
};
$.plot($("#cpu_chart"), datasets, options);
}
</script>