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

Unified Diff: dashboard/dashboard/speed_releasing.py

Issue 2619883003: More structure for speed releasing. (Closed)
Patch Set: response to comments Created 3 years, 11 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 a1ec155ecd5b218bc5abe2880dcb6c65712f756f..accfbeb902a034e45c3caede8111548f45fde3b8 100644
--- a/dashboard/dashboard/speed_releasing.py
+++ b/dashboard/dashboard/speed_releasing.py
@@ -7,23 +7,40 @@
import json
from dashboard.common import request_handler
+from dashboard.models import table_config
class SpeedReleasingHandler(request_handler.RequestHandler):
"""Request handler for requests for speed releasing page."""
- def get(self):
+ def get(self, _):
"""Renders the UI for the speed releasing page."""
+
self.RenderStaticHtml('speed_releasing.html')
- def post(self):
+ def post(self, table_name):
eakuefner 2017/01/11 20:15:48 Also, as I mused about on the other CL, I'm not su
"""Returns dynamic data for /speed_releasing.
Outputs:
JSON for the /speed_releasing page XHR request.
"""
- values = {}
- self.GetDynamicVariables(values)
- self.response.out.write(json.dumps({
- 'xsrf_token': values['xsrf_token'],
- }))
+ if table_name:
+ query = table_config.TableConfig.query(
+ table_config.TableConfig.name == table_name)
+ table_values = query.fetch(limit=1)
+ values = {}
+ self.GetDynamicVariables(values)
+ self.response.out.write(json.dumps({
+ 'xsrf_token': values['xsrf_token'],
+ 'table_bots': table_values[0].bots,
+ 'table_tests': table_values[0].tests,
+ 'table_layout': table_values[0].table_layout,
+ }))
+ else:
+ values = {}
+ self.GetDynamicVariables(values)
+ self.response.out.write(json.dumps({
+ 'xsrf_token': values['xsrf_token'],
+ 'table_bots': 'TODO jessimb, list links for health reports.'
+ }))
+
« dashboard/dashboard/dispatcher.py ('K') | « dashboard/dashboard/elements/speed-releasing-page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698