|
|
|
@ -1103,7 +1103,7 @@ def prepare_plot(id):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
q = [{"info":"Monitoring RAM consumption trends","ylabel":"% used","node":node, "x":XRAM,"labels":np.arange(1,xn).tolist(),"series":names,"title":"RAM Usage"}]
|
|
|
|
|
q.append({"info":"Monitoring CPU consumption trends","ylabel":"% used","node":node,"x":XCPU,"labels":np.arange(1,xn_).tolist(),"series":names,"title":"CPU Usage"})
|
|
|
|
|
q.append({"info":"Monitoring CPU consumption trends","ylabel":"% used","node":node,"type":"bar","x":XCPU,"labels":np.arange(1,xn_).tolist(),"series":names,"title":"CPU Usage"})
|
|
|
|
|
key = 'app.trend.'+node
|
|
|
|
|
session[key] = q
|
|
|
|
|
return (key,200)
|
|
|
|
@ -1120,14 +1120,16 @@ def get_charts(format,id,key):
|
|
|
|
|
series = ['series_1']
|
|
|
|
|
|
|
|
|
|
args = session[key]
|
|
|
|
|
if isinstance(args,list) and 'index' in request.args:
|
|
|
|
|
index = int(request.args['index'])
|
|
|
|
|
args = args[index]
|
|
|
|
|
if isinstance(args,list) is False:
|
|
|
|
|
args['remove'] = remove
|
|
|
|
|
info = [Graph.instance(format,id,**args)]
|
|
|
|
|
else:
|
|
|
|
|
# print args
|
|
|
|
|
info = [ Graph.instance(format,id, **dict(item,**{'remove':remove})) for item in args]
|
|
|
|
|
if 'index' in request.args :
|
|
|
|
|
index = int(request.args['index'])
|
|
|
|
|
args = args[index]
|
|
|
|
|
|
|
|
|
|
# if remove is not None :
|
|
|
|
|
# args['remove'] = remove
|
|
|
|
|
|
|
|
|
|