|
|
@ -20,8 +20,6 @@ dashboard = {
|
|
|
|
var getData = $.get('/1/app/usage/trend');
|
|
|
|
var getData = $.get('/1/app/usage/trend');
|
|
|
|
var appStatus = $.get('/1/app/status?node=apps@seeker-hacker&app=terminal');
|
|
|
|
var appStatus = $.get('/1/app/status?node=apps@seeker-hacker&app=terminal');
|
|
|
|
console.log('appstatus...', appStatus)
|
|
|
|
console.log('appstatus...', appStatus)
|
|
|
|
console.log('appstatus statusText...', appStatus.status)
|
|
|
|
|
|
|
|
console.log('appstatus responseText...', appStatus.responseText)
|
|
|
|
|
|
|
|
console.log('getData...', getData);
|
|
|
|
console.log('getData...', getData);
|
|
|
|
|
|
|
|
|
|
|
|
getData.done(function(results) {
|
|
|
|
getData.done(function(results) {
|
|
|
@ -57,6 +55,10 @@ dashboard = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return statusList
|
|
|
|
return statusList
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
monitorStatus = function(idle, crash, running){ // TODO: make this async with g.summary at bottom
|
|
|
|
|
|
|
|
return idle, crash, running
|
|
|
|
|
|
|
|
}
|
|
|
|
// monitoring apps chart
|
|
|
|
// monitoring apps chart
|
|
|
|
var dataChart = {
|
|
|
|
var dataChart = {
|
|
|
|
labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
|
|
|
|
labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
|
|
|
@ -201,7 +203,7 @@ dashboard = {
|
|
|
|
for (i in percentage){
|
|
|
|
for (i in percentage){
|
|
|
|
percentage[i] = percentage[i].toString()+'%';
|
|
|
|
percentage[i] = percentage[i].toString()+'%';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log("running", running)
|
|
|
|
Chartist.Pie('#chartPreferences', {
|
|
|
|
Chartist.Pie('#chartPreferences', {
|
|
|
|
labels: percentage,
|
|
|
|
labels: percentage,
|
|
|
|
series: [1,2,3]
|
|
|
|
series: [1,2,3]
|
|
|
@ -269,6 +271,7 @@ g.summary.factory = function (url,pointer) {
|
|
|
|
r = JSON.parse(r.responseText)
|
|
|
|
r = JSON.parse(r.responseText)
|
|
|
|
pointer(r)
|
|
|
|
pointer(r)
|
|
|
|
console.log(r)
|
|
|
|
console.log(r)
|
|
|
|
|
|
|
|
monitorStatus(r.idle, r.crash, r.running)
|
|
|
|
|
|
|
|
|
|
|
|
//observer.notify()
|
|
|
|
//observer.notify()
|
|
|
|
|
|
|
|
|
|
|
@ -285,7 +288,6 @@ g.summary.factory = function (url,pointer) {
|
|
|
|
|
|
|
|
|
|
|
|
//observer.notify()
|
|
|
|
//observer.notify()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return object
|
|
|
|
return object
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|