[LNT] r258373 - Allow regressions to be json dumped
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 16:14:28 PST 2016
Author: cmatthews
Date: Wed Jan 20 18:14:28 2016
New Revision: 258373
URL: http://llvm.org/viewvc/llvm-project?rev=258373&view=rev
Log:
Allow regressions to be json dumped
Modified:
lnt/trunk/lnt/server/ui/regression_views.py
Modified: lnt/trunk/lnt/server/ui/regression_views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/regression_views.py?rev=258373&r1=258372&r2=258373&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/regression_views.py (original)
+++ lnt/trunk/lnt/server/ui/regression_views.py Wed Jan 20 18:14:28 2016
@@ -313,6 +313,12 @@ def v4_regression_detail(id):
crs.append(ChangeData(fc, cr, key_run, current_cr))
form.field_changes.choices.append((fc.id, 1,))
+ if request.args.get('json'):
+ return json.dumps({u'Regression': regression_info,
+ u'Changes':crs},
+ cls=LNTEncoder)
+
+
return render_template("v4_regression_detail.html",
testsuite_name=g.testsuite_name,
regression=regression_info, changes=crs,
@@ -323,7 +329,7 @@ def v4_hook():
ts = request.get_testsuite()
rule_hooks.post_submission_hooks(ts, 0)
abort(400)
-
+
@v4_route("/regressions/new_from_graph/<int:machine_id>/<int:test_id>/<int:field_index>/<int:run_id>", methods=["GET"])
def v4_make_regression(machine_id, test_id, field_index, run_id):
More information about the llvm-commits
mailing list