main.py 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright (C) 2009 Google Inc. All rights reserved.
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are
  5. # met:
  6. #
  7. # * Redistributions of source code must retain the above copyright
  8. # notice, this list of conditions and the following disclaimer.
  9. # * Redistributions in binary form must reproduce the above
  10. # copyright notice, this list of conditions and the following disclaimer
  11. # in the documentation and/or other materials provided with the
  12. # distribution.
  13. # * Neither the name of Google Inc. nor the names of its
  14. # contributors may be used to endorse or promote products derived from
  15. # this software without specific prior written permission.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  20. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  21. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  23. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. # Request a modern Django
  29. from google.appengine.dist import use_library
  30. use_library('django', '1.2') # Must agree with __init.py__
  31. from google.appengine.ext import webapp
  32. from google.appengine.ext.webapp.util import run_wsgi_app
  33. from handlers.activebots import ActiveBots
  34. from handlers.dashboard import Dashboard
  35. from handlers.gc import GC
  36. from handlers.nextpatch import NextPatch
  37. from handlers.patch import Patch
  38. from handlers.patchstatus import PatchStatus
  39. from handlers.queuecharts import QueueCharts
  40. from handlers.queuestatus import QueueStatus
  41. from handlers.recentstatus import QueuesOverview
  42. from handlers.releasepatch import ReleasePatch
  43. from handlers.showresults import ShowResults
  44. from handlers.statusbubble import StatusBubble
  45. from handlers.submittoews import SubmitToEWS
  46. from handlers.svnrevision import SVNRevision
  47. from handlers.syncqueuelogs import SyncQueueLogs
  48. from handlers.updatestatus import UpdateStatus
  49. from handlers.updatesvnrevision import UpdateSVNRevision
  50. from handlers.updateworkitems import UpdateWorkItems
  51. webapp.template.register_template_library('filters.webkit_extras')
  52. routes = [
  53. ('/', QueuesOverview),
  54. ('/dashboard', Dashboard),
  55. ('/gc', GC),
  56. ('/sync-queue-logs', SyncQueueLogs),
  57. (r'/patch-status/(.*)/(.*)', PatchStatus),
  58. (r'/patch/(.*)', Patch),
  59. (r'/submit-to-ews', SubmitToEWS),
  60. (r'/results/(.*)', ShowResults),
  61. (r'/status-bubble/(.*)', StatusBubble),
  62. (r'/svn-revision/(.*)', SVNRevision),
  63. (r'/queue-charts/(.*)', QueueCharts),
  64. (r'/queue-status/(.*)/bots/(.*)', QueueStatus),
  65. (r'/queue-status/(.*)', QueueStatus),
  66. (r'/next-patch/(.*)', NextPatch),
  67. (r'/release-patch', ReleasePatch),
  68. ('/update-status', UpdateStatus),
  69. ('/update-work-items', UpdateWorkItems),
  70. ('/update-svn-revision', UpdateSVNRevision),
  71. ('/active-bots', ActiveBots),
  72. ]
  73. application = webapp.WSGIApplication(routes, debug=True)
  74. def main():
  75. run_wsgi_app(application)
  76. if __name__ == "__main__":
  77. main()