bug fix ...

community
michael.mead 7 years ago
parent 21a84c029b
commit 9f9ab8dd39

@ -68,7 +68,7 @@ def home():
apps = []
try:
#
# The user must pass a key in heref
# The user must pass a key in href
key = request.header['key']
args= dict(p)
args['uid'] = key
@ -76,10 +76,11 @@ def home():
gReader = factory.instance(type=class_read,args=p)
apps = gReader.view('summary/nodes',key=p['uid'])
except Exception, e:
except Exception as e:
print (e)
return render_template('dashboard.html',context=context,title=title,app_names=apps)
@app.route('/register', methods=['POST'])
def register():
"""
@ -126,7 +127,7 @@ def get_nodes():
gReader = factory.instance(type=class_read, args=p)
r = gReader.view('summary/nodes', key=app_key)
session['default.node'] = r[0]
except Exception,e:
except Exception as e:
print (e)
return json.dumps(r)
@ -143,7 +144,7 @@ def get_apps():
r = gReader.view('summary/app_names',key=p['uid'])
r = r[node_id]
session['default.app'] = r[0]
except Exception,e:
except Exception as e:
print (e)
return json.dumps(r)
@ -183,7 +184,7 @@ def get_logs() :
for id in session['logs'] :
r[id] = session['logs'][id]
# r[id] = r[node_id]
except Exception,e:
except Exception as e:
print (e)
return json.dumps(r)
@app.route("/1/set/logs",methods=['PUT'])
@ -231,7 +232,7 @@ def get_usage_trend():
try:
gReader = factory.instance(type=class_read,args=p)
r = gReader.view('summary/resource_usage_trend',key=p['uid'])
except Exception,e:
except Exception as e:
print (e)
return json.dumps(r)
@ -269,7 +270,7 @@ def get_usage_detail():
else :
r = r[id]
except Exception,e:
except Exception as e:
print ' *** ',(e)
return json.dumps(r)
@ -295,7 +296,7 @@ def app_status() :
print[nid,aid]
r = r[nid][aid]
except Exception,e:
except Exception as e:
print e
return json.dumps(r)
@ -464,7 +465,7 @@ def sandbox():
try:
handler.init(conf[id])
r.append (dict(handler.composite(),**{"label":id}))
except Exception,e:
except Exception as e:
pass
else:
@ -579,7 +580,7 @@ def user():
#_info = params[name]
#try:
#xo = ML.Filter('label',name,d)
#except Exception,e:
#except Exception as e:
#xo = []
##print name,e
#if len(xo) == 0:

Loading…
Cancel
Save