|
|
|
@ -58,7 +58,7 @@ def home():
|
|
|
|
|
apps = []
|
|
|
|
|
try:
|
|
|
|
|
gReader = factory.instance(type=class_read,args=p)
|
|
|
|
|
apps = gReader.view('summary/app_names',key=p['uid']).keys()
|
|
|
|
|
apps = gReader.view('summary/nodes',key=p['uid'])
|
|
|
|
|
|
|
|
|
|
except Exception, e:
|
|
|
|
|
print (e)
|
|
|
|
@ -91,6 +91,7 @@ def get_apps():
|
|
|
|
|
gReader = factory.instance(type=class_read,args=p)
|
|
|
|
|
r = gReader.view('summary/app_names',key=p['uid'])
|
|
|
|
|
r = r[node_id]
|
|
|
|
|
print r
|
|
|
|
|
except Exception,e:
|
|
|
|
|
print (e)
|
|
|
|
|
return json.dumps(r)
|
|
|
|
@ -145,10 +146,11 @@ def get_usage_detail():
|
|
|
|
|
"""
|
|
|
|
|
r = {}
|
|
|
|
|
try:
|
|
|
|
|
id = request.args.get('node')
|
|
|
|
|
id = request.args.get('node')
|
|
|
|
|
app_id = request.args.get('app')
|
|
|
|
|
gReader = factory.instance(type=class_read,args=p)
|
|
|
|
|
r = gReader.view('summary/app_resource_usage_details',key=p['uid'])
|
|
|
|
|
r = r[id]
|
|
|
|
|
r = r[id][app_id]
|
|
|
|
|
except Exception,e:
|
|
|
|
|
print (e)
|
|
|
|
|
return json.dumps(r)
|
|
|
|
|