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

Side by Side Diff: appengine/isolate/handlers_frontend.py

Issue 2989373002: Modify isolate proto to have UI key (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « appengine/isolate/handlers_endpoints_v1.py ('k') | appengine/isolate/proto/config.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 The LUCI Authors. All rights reserved. 1 # Copyright 2012 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """This module defines Isolate Server frontend url handlers.""" 5 """This module defines Isolate Server frontend url handlers."""
6 6
7 import collections 7 import collections
8 import datetime 8 import datetime
9 import json 9 import json
10 import logging 10 import logging
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 388
389 class UIHandler(auth.AuthenticatingHandler): 389 class UIHandler(auth.AuthenticatingHandler):
390 """Serves the landing page for the new UI of the requested page. 390 """Serves the landing page for the new UI of the requested page.
391 391
392 This landing page is stamped with the OAuth 2.0 client id from the 392 This landing page is stamped with the OAuth 2.0 client id from the
393 configuration. 393 configuration.
394 """ 394 """
395 @auth.public 395 @auth.public
396 def get(self): 396 def get(self):
397 params = {} 397 params = {
398 'client_id': config.settings().ui_client_id,
399 }
398 # Can cache for 1 week, because the only thing that would change in this 400 # Can cache for 1 week, because the only thing that would change in this
399 # template is the oauth client id, which changes very infrequently. 401 # template is the oauth client id, which changes very infrequently.
400 self.response.cache_control.no_cache = None 402 self.response.cache_control.no_cache = None
401 self.response.cache_control.public = True 403 self.response.cache_control.public = True
402 self.response.cache_control.max_age = 604800 404 self.response.cache_control.max_age = 604800
403 try: 405 try:
404 self.response.write(template.render( 406 self.response.write(template.render(
405 'isolate/public_isolate_index.html', params)) 407 'isolate/public_isolate_index.html', params))
406 except template.TemplateNotFound: 408 except template.TemplateNotFound:
407 self.abort(404, 'Page not found.') 409 self.abort(404, 'Page not found.')
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 def create_application(debug): 457 def create_application(debug):
456 """Creates the url router. 458 """Creates the url router.
457 459
458 The basic layouts is as follow: 460 The basic layouts is as follow:
459 - /restricted/.* requires being an instance administrator. 461 - /restricted/.* requires being an instance administrator.
460 - /stats/.* has statistics. 462 - /stats/.* has statistics.
461 """ 463 """
462 acl.bootstrap() 464 acl.bootstrap()
463 template.bootstrap() 465 template.bootstrap()
464 return webapp2.WSGIApplication(get_routes(), debug=debug) 466 return webapp2.WSGIApplication(get_routes(), debug=debug)
OLDNEW
« no previous file with comments | « appengine/isolate/handlers_endpoints_v1.py ('k') | appengine/isolate/proto/config.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698