|
|
|
@ -20,19 +20,27 @@ dashboard = {
|
|
|
|
|
|
|
|
|
|
getData.done(function(results) {
|
|
|
|
|
var data = JSON.parse(results)
|
|
|
|
|
var app = data['Chrome'];
|
|
|
|
|
var node = data['apps@michaels-MBP'];
|
|
|
|
|
var app = node['chrome'];
|
|
|
|
|
var cpu = app['cpu'];
|
|
|
|
|
var memory_used = app['memory_used'];
|
|
|
|
|
console.log('data...',data)
|
|
|
|
|
console.log('node...',node)
|
|
|
|
|
console.log('app...',app)
|
|
|
|
|
console.log('cpu...',cpu)
|
|
|
|
|
console.log('memory_used...', memory_used)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// monitoring apps chart
|
|
|
|
|
var dataChart = {
|
|
|
|
|
labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
|
|
|
|
|
series: [app.memory_used, app.cpu, ] // TODO: Check the order, the graph is by index not name.
|
|
|
|
|
labels: ['24','23','22','21','20','19','18','17','16','15','14','13','12','11','10','9','8','7','6','5','4','3','2','1' ],
|
|
|
|
|
series: [cpu, memory_used, [1,2,3,50], ] // TODO: Check the order, the graph is by index not name.
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var optionsChart = {
|
|
|
|
|
lineSmooth: false,
|
|
|
|
|
low: 0,
|
|
|
|
|
high: 100,
|
|
|
|
|
high: 10,
|
|
|
|
|
showArea: true,
|
|
|
|
|
height: "245px",
|
|
|
|
|
axisX: {
|
|
|
|
@ -60,7 +68,7 @@ dashboard = {
|
|
|
|
|
// cpu and memory --------------------------
|
|
|
|
|
var data = {
|
|
|
|
|
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
|
|
|
series: [app.cpu, app.memory_used]
|
|
|
|
|
series: [cpu, memory_used]
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|