start getting idle,crash,running

community
Michael Mead 7 years ago
parent e2194b8da4
commit 682e20ba93

@ -1,5 +1,5 @@
{
"id":"seeker-hacker",
"id":"michaels-MBP",
"key":"4q-h8r5-247&!570p=[0v8]x360",
"api":"dev.the-phi.com",
"delay":10.0,
@ -7,12 +7,12 @@
"class":{"read":"CouchdbReader","write":"CouchdbWriter"},
"args":{"uri":"http://dev.the-phi.com:5984","dbname":"mike-db","uid":"logs"}
},
"procs":["kate","firefox"],
"procs":["mail","safari", "chrome", "terminal"],
"folders":["/Users/michaelmead/Downloads"],
"actions":{
"folders":{"threshold":"10mb","action":"archive","key":""},
"apps":{"mail":"","safari":"","chrome":"" }
}
}

@ -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
}

Loading…
Cancel
Save