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