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

Unified Diff: appengine/swarming/handlers_frontend.py

Issue 2242543002: Make OAuth client id accessible to new ui w/o hardcoding (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Address nits Created 4 years, 4 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: appengine/swarming/handlers_frontend.py
diff --git a/appengine/swarming/handlers_frontend.py b/appengine/swarming/handlers_frontend.py
index ed87727d09e866f4538c9d7a654b67aafd29b910..158d74e69cf2a76feb3f490e776fd3193791e53c 100644
--- a/appengine/swarming/handlers_frontend.py
+++ b/appengine/swarming/handlers_frontend.py
@@ -744,6 +744,19 @@ class RootHandler(auth.AuthenticatingHandler):
self.response.write(template.render('swarming/root.html', params))
+class UIHandler(auth.AuthenticatingHandler):
+ @auth.public
+ def get(self, page):
+ if not page:
+ page = "swarming"
+
+ params = {
+ 'client_id': config.settings().ui_client_id,
+ }
+ self.response.write(template.render(
+ 'swarming/public_%s_index.html' % page, params))
+
+
class WarmupHandler(webapp2.RequestHandler):
def get(self):
auth.warmup()
@@ -768,6 +781,7 @@ def create_application(debug):
# Public pages.
('/', RootHandler),
('/stats', stats_gviz.StatsSummaryHandler),
+ ('/newui/<page:[a-z]*>', UIHandler),
# User pages.
('/user/tasks', TasksHandler),
« no previous file with comments | « appengine/swarming/elements/res/imp/index/swarming-index.html ('k') | appengine/swarming/proto/config.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698