Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Unified Diff: dashboard/dashboard/speed_releasing.py

Issue 2658643005: Added report URLs to the dashboard. (Closed)
Patch Set: resolving merge conficts Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dashboard/dashboard/speed_releasing.py
diff --git a/dashboard/dashboard/speed_releasing.py b/dashboard/dashboard/speed_releasing.py
index 7ff3fb2b2a976adcb897fffda9135a01dff3952e..08892e406cb0a9429b2ccfadd219202ae1478a89 100644
--- a/dashboard/dashboard/speed_releasing.py
+++ b/dashboard/dashboard/speed_releasing.py
@@ -6,6 +6,7 @@
import collections
import json
+import urllib
from google.appengine.ext import ndb
@@ -109,6 +110,8 @@ class SpeedReleasingHandler(request_handler.RequestHandler):
'units': _GetTestToUnitsMap(master_bot_pairs, table_entity.tests),
'revisions': revisions,
'categories': _GetCategoryCounts(json.loads(table_entity.table_layout)),
+ 'urls': _GetDashboardURLMap(master_bot_pairs, table_entity.tests,
+ rev_a, rev_b),
'display_revisions': [display_b, display_a] # Similar to revisions.
}))
@@ -197,6 +200,29 @@ def _GetCategoryCounts(layout):
categories[layout[test][0]] += 1
return categories
+def _GetDashboardURLMap(bots, tests, rev_a, rev_b):
+ """Get the /report links appropriate for the bot and test."""
+ url_mappings = {}
+ for bot in bots:
+ for test in tests:
+ test_parts = test.split('/')
+ bot_parts = bot.split('/')
+
+ # Checked should be the last part of the test path, if available.
+ checked = 'all'
+ if len(test_parts) > 1:
+ checked = test_parts[len(test_parts) - 1]
+ url_args = {
+ 'masters': bot_parts[0],
+ 'bots': bot_parts[1],
+ 'tests': test,
+ 'checked': checked,
+ 'start_rev': rev_a,
+ 'end_rev': rev_b,
+ }
+ url_mappings[bot + '/' + test] = '?%s' % urllib.urlencode(url_args)
+ return url_mappings
+
def _GetDisplayRev(bots, tests, rev):
"""Creates a user friendly commit position to display.
For V8 and ChromiumPerf masters, this will just be the passed in rev.
« no previous file with comments | « dashboard/dashboard/elements/speed-releasing-table-test.html ('k') | dashboard/dashboard/speed_releasing_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698