| Index: appengine/config_service/handlers.py
|
| diff --git a/appengine/config_service/handlers.py b/appengine/config_service/handlers.py
|
| index 3a6e135477939404fbabc8a086c5f0171803e6e0..48292a6497c3890b0b8d47d6beb21c84d8d9c255 100644
|
| --- a/appengine/config_service/handlers.py
|
| +++ b/appengine/config_service/handlers.py
|
| @@ -5,6 +5,7 @@
|
| import httplib
|
|
|
| import webapp2
|
| +import jinja2
|
|
|
| from components import decorators
|
| from components.config.proto import service_config_pb2
|
| @@ -13,7 +14,12 @@ import common
|
| import gitiles_import
|
| import notifications
|
| import storage
|
| +import os
|
|
|
| +JINJA_ENVIRONMENT = jinja2.Environment(
|
| + loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
|
| + extensions=['jinja2.ext.autoescape'],
|
| + autoescape=True)
|
|
|
| class CronGitilesImport(webapp2.RequestHandler):
|
| """Imports configs from Gitiles."""
|
| @@ -29,6 +35,16 @@ class MainPageHandler(webapp2.RequestHandler):
|
| self.redirect('_ah/api/explorer')
|
|
|
|
|
| +class UIHandler(webapp2.RequestHandler):
|
| + """This is the temporary handler for the new ui until we
|
| + are ready to deploy this on the main url (luci-config.appspot.com).
|
| + This handler can be accessed at luci-config.appspot.com/newui"""
|
| +
|
| + def get(self):
|
| + template = JINJA_ENVIRONMENT.get_template('ui/index.html')
|
| + self.response.write(template.render())
|
| +
|
| +
|
| class SchemasHandler(webapp2.RequestHandler):
|
| """Redirects to a known schema definition."""
|
|
|
| @@ -51,6 +67,7 @@ class SchemasHandler(webapp2.RequestHandler):
|
| def get_frontend_routes(): # pragma: no cover
|
| return [
|
| webapp2.Route(r'/', MainPageHandler),
|
| + webapp2.Route(r'/newui', UIHandler),
|
| webapp2.Route(r'/schemas/<name:.+>', SchemasHandler),
|
| webapp2.Route(r'/_ah/bounce', notifications.BounceHandler),
|
| ]
|
|
|