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

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

Issue 2047753002: Add hack to enable multilogin. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 # Copyright 2013 The LUCI Authors. All rights reserved. 1 # Copyright 2013 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 """Main entry point for Swarming service. 5 """Main entry point for Swarming service.
6 6
7 This file contains the URL handlers for all the Swarming service URLs, 7 This file contains the URL handlers for all the Swarming service URLs,
8 implemented using the webapp2 framework. 8 implemented using the webapp2 framework.
9 """ 9 """
10 10
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 params = { 636 params = {
637 'bot': bot_future.get_result() if bot_future else None, 637 'bot': bot_future.get_result() if bot_future else None,
638 'children_tasks': children_tasks, 638 'children_tasks': children_tasks,
639 'is_admin': acl.is_admin(), 639 'is_admin': acl.is_admin(),
640 'is_gae_admin': users.is_current_user_admin(), 640 'is_gae_admin': users.is_current_user_admin(),
641 'is_privileged_user': acl.is_privileged_user(), 641 'is_privileged_user': acl.is_privileged_user(),
642 'following_task': following_task, 642 'following_task': following_task,
643 'full_appid': os.environ['APPLICATION_ID'], 643 'full_appid': os.environ['APPLICATION_ID'],
644 'host_url': self.request.host_url, 644 'host_url': self.request.host_url,
645 'is_running': result.state == task_result.State.RUNNING, 645 'is_running': result.state == task_result.State.RUNNING,
646 'now': utils.utcnow(),
ghost stip (do not use) 2016/06/07 23:04:25 aw
647 'parent_task': parent_task, 646 'parent_task': parent_task,
648 'previous_task': previous_task, 647 'previous_task': previous_task,
649 'request': request, 648 'request': request,
650 'task': result, 649 'task': result,
651 'xsrf_token': self.generate_xsrf_token(), 650 'xsrf_token': self.generate_xsrf_token(),
652 } 651 }
653 self.response.write(template.render('swarming/user_task.html', params)) 652 self.response.write(template.render('swarming/user_task.html', params))
654 653
655 654
656 class TaskCancelHandler(BaseTaskHandler): 655 class TaskCancelHandler(BaseTaskHandler):
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 # If running on a local dev server, allow bots to connect without prior 766 # If running on a local dev server, allow bots to connect without prior
768 # groups configuration. Useful when running smoke test. 767 # groups configuration. Useful when running smoke test.
769 if utils.is_local_dev_server(): 768 if utils.is_local_dev_server():
770 acl.bootstrap_dev_server_acls() 769 acl.bootstrap_dev_server_acls()
771 770
772 # TODO(maruel): Split backend into a separate module. For now add routes here. 771 # TODO(maruel): Split backend into a separate module. For now add routes here.
773 routes.extend(handlers_backend.get_routes()) 772 routes.extend(handlers_backend.get_routes())
774 routes.extend(handlers_bot.get_routes()) 773 routes.extend(handlers_bot.get_routes())
775 774
776 return webapp2.WSGIApplication(routes, debug=debug) 775 return webapp2.WSGIApplication(routes, debug=debug)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698