CO - Bug fix with trends,

community
Steve L. Nyemba 7 years ago
parent 1dae493121
commit 03535d0070

@ -160,19 +160,26 @@ def get_usage_detail():
else:
id = request.args['id'] if 'id' in request.args else request.args.get('node')
if 'app' not in request.args :
app_id = session['default.app']
if 'default.app' in session :
app_id = session['default.app']
else:
app_id = None
else:
app_id = request.args.get('app')
#
# removing trailing white spaces
id = id.strip()
app_id = app_id.strip()
gReader = factory.instance(type=class_read,args=p)
r = gReader.view('summary/app_resource_usage_details',key=p['uid'])
print r.keys()
r = r[id][app_id]
id = id.strip()
if app_id is not None :
app_id = app_id.strip()
r = r[id][app_id]
else :
r = r[id]
except Exception,e:
print (e)
print ' *** ',(e)
return json.dumps(r)

Loading…
Cancel
Save