Chromium Code Reviews| Index: appengine/isolate/handlers_frontend.py |
| diff --git a/appengine/isolate/handlers_frontend.py b/appengine/isolate/handlers_frontend.py |
| index 56e4e781a5c0b2f8f34f07406ed4ddcffe5585b8..03f45efffba6ec4f726c5bfe59466db8b1197b96 100644 |
| --- a/appengine/isolate/handlers_frontend.py |
| +++ b/appengine/isolate/handlers_frontend.py |
| @@ -386,6 +386,26 @@ 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.""" |
|
M-A Ruel
2017/08/01 19:13:13
""" on its own line
kjlubick
2017/08/02 12:51:22
Done.
|
| + @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 +441,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), |