Example #1
0
def create_frontend_app():
  template.bootstrap({
      'templates': os.path.join(THIS_DIR, 'templates'),
  })
  routes = get_routes()
  routes.extend(handlers_endpoints.get_routes())
  return webapp2.WSGIApplication(routes)
Example #2
0
def create_frontend_app():
    template.bootstrap({
        'templates': os.path.join(THIS_DIR, 'templates'),
    })
    routes = []
    if not utils.should_disable_ui_routes():
        routes.extend(get_routes())
    routes.extend(handlers_endpoints.get_routes())
    return webapp2.WSGIApplication(routes)
Example #3
0
def create_application(debug):
  template.bootstrap()
  utils.set_task_queue_module('default')

  routes = [
      # Frontend pages. They return HTML.
      # Public pages.
      ('/oldui', OldUIHandler),
      ('/stats', stats_gviz.StatsSummaryHandler),
      ('/<page:(bot|botlist|task|tasklist|)>', UIHandler),

      # User pages.
      ('/user/tasks', TasksHandler),
      ('/user/task/<task_id:[0-9a-fA-F]+>', TaskHandler),
      ('/user/task/<task_id:[0-9a-fA-F]+>/cancel', TaskCancelHandler),
      ('/user/task/<task_id:[0-9a-fA-F]+>/retry', TaskRetryHandler),

      # Privileged user pages.
      ('/restricted/bots', BotsListHandler),
      ('/restricted/bot/<bot_id:[^/]+>', BotHandler),
      ('/restricted/bot/<bot_id:[^/]+>/delete', BotDeleteHandler),

      # Admin pages.
      ('/restricted/config', RestrictedConfigHandler),
      ('/restricted/cancel_pending', RestrictedCancelPendingHandler),
      ('/restricted/upload/bot_config', UploadBotConfigHandler),
      ('/restricted/upload/bootstrap', UploadBootstrapHandler),

      # Mapreduce related urls.
      (r'/restricted/launch_mapreduce', RestrictedLaunchMapReduceJob),

      # The new APIs:
      ('/swarming/api/v1/stats/summary/<resolution:[a-z]+>',
        stats_gviz.StatsGvizSummaryHandler),
      ('/swarming/api/v1/stats/dimensions/<dimensions:.+>/<resolution:[a-z]+>',
        stats_gviz.StatsGvizDimensionsHandler),

      ('/_ah/mail/<to:.+>', EmailHandler),
      ('/_ah/warmup', WarmupHandler),
  ]
  routes = [webapp2.Route(*i) for i in routes]

  # If running on a local dev server, allow bots to connect without prior
  # groups configuration. Useful when running smoke test.
  if utils.is_local_dev_server():
    acl.bootstrap_dev_server_acls()

  routes.extend(handlers_backend.get_routes())
  routes.extend(handlers_bot.get_routes())
  routes.extend(handlers_endpoints.get_routes())
  return webapp2.WSGIApplication(routes, debug=debug)
def create_application(debug):
    routes = []
    routes.extend(get_routes())
    routes.extend(handlers_bot.get_routes())
    routes.extend(handlers_endpoints.get_routes())
    return webapp2.WSGIApplication(routes, debug=debug)
Example #5
0
def create_frontend_app():
  return webapp2.WSGIApplication(handlers_endpoints.get_routes())