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

Unified Diff: appengine/swarming/handlers_frontend.py

Issue 2983183002: swarming: trim stale old UI. (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | appengine/swarming/templates/root.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/handlers_frontend.py
diff --git a/appengine/swarming/handlers_frontend.py b/appengine/swarming/handlers_frontend.py
index 6ed639b0df166b13b521ef90662c7876176eef45..706d52ecf1484c7e5d322f27ac48a894df1aaeb5 100644
--- a/appengine/swarming/handlers_frontend.py
+++ b/appengine/swarming/handlers_frontend.py
@@ -138,32 +138,7 @@ class RestrictedLaunchMapReduceJob(auth.AuthenticatingHandler):
self.abort(500, 'Failed to launch the job')
-### Public pages.
-
-
-class OldUIHandler(auth.AuthenticatingHandler):
- @auth.public
- def get(self):
- params = {
- 'host_url': self.request.host_url,
- 'is_admin': acl.is_admin(),
- 'is_privileged_user': acl.is_privileged_user(),
- 'is_user': acl.is_user(),
- 'is_bootstrapper': acl.is_bootstrapper(),
- 'bootstrap_token': '...',
- 'mapreduce_jobs': [],
- 'user_type': acl.get_user_type(),
- 'xsrf_token': '',
- }
- if acl.is_admin():
- params['mapreduce_jobs'] = [
- {'id': job_id, 'name': job_def['job_name']}
- for job_id, job_def in mapreduce_jobs.MAPREDUCE_JOBS.iteritems()
- ]
- params['xsrf_token'] = self.generate_xsrf_token()
- if acl.is_bootstrapper():
- params['bootstrap_token'] = bot_code.generate_bootstrap_token()
- self.response.write(template.render('swarming/root.html', params))
+### Redirectors.
class BotsListHandler(auth.AuthenticatingHandler):
@@ -193,9 +168,6 @@ class BotHandler(auth.AuthenticatingHandler):
self.redirect('/bot?id=%s' % bot_id)
-### User accessible pages.
-
-
class TasksHandler(auth.AuthenticatingHandler):
"""Redirects to a list of all task requests."""
@@ -221,6 +193,9 @@ class TaskHandler(auth.AuthenticatingHandler):
self.redirect('/task?id=%s' % task_id)
+### Public pages.
+
+
class UIHandler(auth.AuthenticatingHandler):
"""Serves the landing page for the new UI of the requested page.
@@ -281,18 +256,16 @@ def get_routes():
routes = [
# Frontend pages. They return HTML.
# Public pages.
- ('/oldui', OldUIHandler),
('/<page:(bot|botlist|task|tasklist|)>', UIHandler),
- # Task pages. Redirects to Polymer UI
+ # Redirects to Polymer UI
('/user/tasks', TasksHandler),
('/user/task/<task_id:[0-9a-fA-F]+>', TaskHandler),
-
- # Bot pages. Redirects to Polymer UI
('/restricted/bots', BotsListHandler),
('/restricted/bot/<bot_id:[^/]+>', BotHandler),
# Admin pages.
+ # TODO(maruel): Get rid of them.
('/restricted/config', RestrictedConfigHandler),
('/restricted/upload/bot_config', UploadBotConfigHandler),
('/restricted/upload/bootstrap', UploadBootstrapHandler),
« no previous file with comments | « no previous file | appengine/swarming/templates/root.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698