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", "key":"4q-h8r5-247&!570p=[0v8]x360",
"api":"dev.the-phi.com", "api":"dev.the-phi.com",
"delay":10.0, "delay":10.0,
@ -7,7 +7,7 @@
"class":{"read":"CouchdbReader","write":"CouchdbWriter"}, "class":{"read":"CouchdbReader","write":"CouchdbWriter"},
"args":{"uri":"http://dev.the-phi.com:5984","dbname":"mike-db","uid":"logs"} "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"], "folders":["/Users/michaelmead/Downloads"],
"actions":{ "actions":{
"folders":{"threshold":"10mb","action":"archive","key":""}, "folders":{"threshold":"10mb","action":"archive","key":""},

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

Loading…
Cancel
Save