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

Unified Diff: appengine/isolate/handlers_frontend.py

Issue 2991153002: Add stub for new polymer-based Isolate UI (Closed)
Patch Set: Address feedback Created 3 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
« no previous file with comments | « appengine/isolate/app.yaml ('k') | appengine/isolate/templates/public_isolate_index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/isolate/handlers_frontend.py
diff --git a/appengine/isolate/handlers_frontend.py b/appengine/isolate/handlers_frontend.py
index 56e4e781a5c0b2f8f34f07406ed4ddcffe5585b8..e95991bcf7701b36adbc5b2e1360addfe2dade31 100644
--- a/appengine/isolate/handlers_frontend.py
+++ b/appengine/isolate/handlers_frontend.py
@@ -386,6 +386,27 @@ class RootHandler(auth.AuthenticatingHandler):
self.response.write(template.render('isolate/root.html', params))
+class UIHandler(auth.AuthenticatingHandler):
+ """Serves the landing page for the new UI of the requested page.
+
+ This landing page is stamped with the OAuth 2.0 client id from the
+ configuration.
+ """
+ @auth.public
+ def get(self):
+ params = {}
+ # Can cache for 1 week, because the only thing that would change in this
+ # template is the oauth client id, which changes very infrequently.
+ self.response.cache_control.no_cache = None
+ self.response.cache_control.public = True
+ self.response.cache_control.max_age = 604800
+ try:
+ self.response.write(template.render(
+ 'isolate/public_isolate_index.html', params))
+ except template.TemplateNotFound:
+ self.abort(404, 'Page not found.')
+
+
class WarmupHandler(webapp2.RequestHandler):
def get(self):
config.warmup()
@@ -421,6 +442,7 @@ def get_routes():
#webapp2.Route(r'/isolate/api/v1/stats/hours', StatsGvizHoursHandler),
#webapp2.Route(r'/isolate/api/v1/stats/minutes', StatsGvizMinutesHandler),
webapp2.Route(r'/', RootHandler),
+ webapp2.Route(r'/newui', UIHandler),
# AppEngine-specific urls:
webapp2.Route(r'/_ah/mail/<to:.+>', EmailHandler),
« no previous file with comments | « appengine/isolate/app.yaml ('k') | appengine/isolate/templates/public_isolate_index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698