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: else:
id = request.args['id'] if 'id' in request.args else request.args.get('node') id = request.args['id'] if 'id' in request.args else request.args.get('node')
if 'app' not in request.args : 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: else:
app_id = request.args.get('app') app_id = request.args.get('app')
# #
# removing trailing white spaces # removing trailing white spaces
id = id.strip()
app_id = app_id.strip()
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'])
print r.keys() id = id.strip()
r = r[id][app_id] if app_id is not None :
app_id = app_id.strip()
r = r[id][app_id]
else :
r = r[id]
except Exception,e: except Exception,e:
print (e) print ' *** ',(e)
return json.dumps(r) return json.dumps(r)

Loading…
Cancel
Save