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