|
|
@ -106,7 +106,7 @@ class apps(analytics) :
|
|
|
|
r.append( {"x":[row['crash'],row['idle'],row['running']],"labels":['Crash','Idle','Running'],"title":row['node'],"date":row['date']})
|
|
|
|
r.append( {"x":[row['crash'],row['idle'],row['running']],"labels":['Crash','Idle','Running'],"title":row['node'],"date":row['date']})
|
|
|
|
# q.append({"x":[[row['cpu'],row['mem']]],"labels":["CPU","RAM"],"title":"Resources","date":row['date'],"title":row['node'],"series":[ 'CPU','RAM' ]})
|
|
|
|
# q.append({"x":[[row['cpu'],row['mem']]],"labels":["CPU","RAM"],"title":"Resources","date":row['date'],"title":row['node'],"series":[ 'CPU','RAM' ]})
|
|
|
|
|
|
|
|
|
|
|
|
q.append({"x":[[row['cpu'],0],[0,row['mem']]],"labels":["",""],"title":"Resources","date":row['date'],"title":row['node'],"series":[ 'CPU','RAM' ],"ylabel":"% Resource Used"})
|
|
|
|
q.append({"x":[[row['cpu'],0],[0,row['mem']]],"labels":["",""],"title":"","date":row['date'],"title":row['node'],"series":[ 'CPU','RAM' ],"ylabel":"% Resource Used"})
|
|
|
|
|
|
|
|
|
|
|
|
self.set('status',r)
|
|
|
|
self.set('status',r)
|
|
|
|
self.set('resource',q)
|
|
|
|
self.set('resource',q)
|
|
|
@ -140,7 +140,7 @@ class folders(analytics):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
max_size = 0
|
|
|
|
max_size = 0
|
|
|
|
self.set('max_size',max_size)
|
|
|
|
self.set('max_size',max_size)
|
|
|
|
for id in logs :
|
|
|
|
for id in logs :
|
|
|
|
|
|
|
|
|
|
|
|
row = pd.DataFrame(logs[id]['log'])
|
|
|
|
row = pd.DataFrame(logs[id]['log'])
|
|
|
|
size = row.size_in_kb.mean() * .001
|
|
|
|
size = row.size_in_kb.mean() * .001
|
|
|
@ -176,7 +176,4 @@ class didact():
|
|
|
|
r += item.get(id)
|
|
|
|
r += item.get(id)
|
|
|
|
self.cache['nodes'] = list(set(r) - set([None]))
|
|
|
|
self.cache['nodes'] = list(set(r) - set([None]))
|
|
|
|
def get(self,id):
|
|
|
|
def get(self,id):
|
|
|
|
return self.cache[id] if id in self.cache else None
|
|
|
|
return self.cache[id] if id in self.cache else None
|
|
|
|
|
|
|
|
|
|
|
|
config = {"args":{"uid":"cus_D2x3ItYNfWjSY3", "dbname":"smart-top","uri":"http://admin:@dm1n@dev.the-phi.com:5985"},"type":"CouchdbReader"}
|
|
|
|
|
|
|
|
p = folders(config = config,key="cus_D2x3ItYNfWjSY3")
|
|
|
|
|