[LNT] r256293 - Render runID into Regression popover
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 22 15:13:17 PST 2015
Author: cmatthews
Date: Tue Dec 22 17:13:17 2015
New Revision: 256293
URL: http://llvm.org/viewvc/llvm-project?rev=256293&view=rev
Log:
Render runID into Regression popover
Modified:
lnt/trunk/lnt/server/ui/api.py
lnt/trunk/lnt/server/ui/static/lnt_graph.js
Modified: lnt/trunk/lnt/server/ui/api.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/api.py?rev=256293&r1=256292&r2=256293&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/api.py (original)
+++ lnt/trunk/lnt/server/ui/api.py Tue Dec 22 17:13:17 2015
@@ -174,7 +174,7 @@ class Graph(Resource):
except NoResultFound:
return abort(404)
- q = ts.query(field.column, ts.Order.llvm_project_revision, ts.Run.start_time) \
+ q = ts.query(field.column, ts.Order.llvm_project_revision, ts.Run.start_time, ts.Run.id) \
.join(ts.Run) \
.join(ts.Order) \
.filter(ts.Run.machine_id == machine.id) \
@@ -185,7 +185,7 @@ class Graph(Resource):
if field.status_field:
q = q.filter((field.status_field.column == PASS) |
(field.status_field.column == None))
- samples = [[rev, val, {'label': rev, 'date': str(time)}] for val, rev, time in q.all()]
+ samples = [[rev, val, {'label': rev, 'date': str(time), 'runID': str(rid)}] for val, rev, time, rid in q.all()]
return samples
Modified: lnt/trunk/lnt/server/ui/static/lnt_graph.js
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/static/lnt_graph.js?rev=256293&r1=256292&r2=256293&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/static/lnt_graph.js (original)
+++ lnt/trunk/lnt/server/ui/static/lnt_graph.js Tue Dec 22 17:13:17 2015
@@ -74,10 +74,15 @@ function show_tooltip(x, y, item, pos, g
tip_body += "<b>Value:</b> " + data[1].toFixed(4) + "<br>";
if (meta_data.date) {
- tip_body += "<b>Date:</b> " + meta_data.date;
+ tip_body += "<b>Date:</b> " + meta_data.date + "<br>";
}
if (meta_data.state) {
- tip_body += "<b>State:</b> " + meta_data.state;
+ tip_body += "<b>State:</b> " + meta_data.state + "<br>";
+ }
+ if (meta_data.runID) {
+ tip_body += "<b>Run:</b> <a href=\"" +
+ get_run_url(db_name, test_suite_name, meta_data.runID) +
+ "\">" + meta_data.runID + "<br>";
}
tip_body += "</div>";
@@ -145,6 +150,12 @@ function get_regression_url(db, ts, regr
return ["", "db_" + db, "v4", ts, "regressions", regression].join('/');
}
+// Grab the URL for a run by id.
+function get_run_url(db, ts, runID) {
+ "use strict";
+ return ["", "db_" + db, "v4", ts, runID].join('/');
+}
+
// Normalize this data to the element in index
function normalize_data(data_array, index) {
"use strict";
More information about the llvm-commits
mailing list