添加选择baseline参数
This commit is contained in:
parent
934a186987
commit
2898568579
|
@ -62,7 +62,11 @@ def charts():
|
|||
@app.route('/metrics', methods=['GET'])
|
||||
def metrics():
|
||||
type = request.args.get('type')
|
||||
baselines = Baseline.select().order_by(Baseline.rank.desc()).limit(3)
|
||||
baseline = request.args.get('baseline')
|
||||
if baseline is None:
|
||||
baselines = Baseline.select().order_by(Baseline.rank.desc()).limit(3)
|
||||
else:
|
||||
baselines = Baseline.select().where(Baseline.rank <= baseline).order_by(Baseline.rank.desc()).limit(3)
|
||||
metrics = {}
|
||||
for i in range(len(baselines)):
|
||||
baseline = baselines[i]
|
||||
|
|
Loading…
Reference in New Issue