diff options
Diffstat (limited to 'WebKitTools/QueueStatusServer')
13 files changed, 218 insertions, 15 deletions
diff --git a/WebKitTools/QueueStatusServer/handlers/__init__.py b/WebKitTools/QueueStatusServer/handlers/__init__.py index ef65bee..296e173 100644 --- a/WebKitTools/QueueStatusServer/handlers/__init__.py +++ b/WebKitTools/QueueStatusServer/handlers/__init__.py @@ -1 +1,3 @@ # Required for Python to search this directory for module files + +from handlers.updatebase import UpdateBase diff --git a/WebKitTools/QueueStatusServer/handlers/svnrevision.py b/WebKitTools/QueueStatusServer/handlers/svnrevision.py new file mode 100644 index 0000000..36eab33 --- /dev/null +++ b/WebKitTools/QueueStatusServer/handlers/svnrevision.py @@ -0,0 +1,40 @@ +# Copyright (C) 2009 Google Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from google.appengine.ext import webapp + +import model + + +class SVNRevision(webapp.RequestHandler): + def get(self, svn_revision_number): + svn_revisions = model.SVNRevision.all().filter('number =', int(svn_revision_number)).order('-date').fetch(1) + if not svn_revisions: + self.error(404) + return + self.response.out.write(svn_revisions[0].to_xml()) diff --git a/WebKitTools/QueueStatusServer/handlers/updatebase.py b/WebKitTools/QueueStatusServer/handlers/updatebase.py new file mode 100644 index 0000000..b087e83 --- /dev/null +++ b/WebKitTools/QueueStatusServer/handlers/updatebase.py @@ -0,0 +1,41 @@ +# Copyright (C) 2010 Google Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from google.appengine.api import users +from google.appengine.ext import webapp, db + + +class UpdateBase(webapp.RequestHandler): + def _int_from_request(self, name): + string_value = self.request.get(name) + try: + int_value = int(string_value) + return int_value + except ValueError, TypeError: + pass + return None diff --git a/WebKitTools/QueueStatusServer/handlers/updatestatus.py b/WebKitTools/QueueStatusServer/handlers/updatestatus.py index 3ad7b77..50d4b6e 100644 --- a/WebKitTools/QueueStatusServer/handlers/updatestatus.py +++ b/WebKitTools/QueueStatusServer/handlers/updatestatus.py @@ -30,23 +30,14 @@ from google.appengine.api import users from google.appengine.ext import webapp, db from google.appengine.ext.webapp import template +from handlers.updatebase import UpdateBase from model.attachment import Attachment from model.queuestatus import QueueStatus - -class UpdateStatus(webapp.RequestHandler): +class UpdateStatus(UpdateBase): def get(self): self.response.out.write(template.render("templates/updatestatus.html", None)) - def _int_from_request(self, name): - string_value = self.request.get(name) - try: - int_value = int(string_value) - return int_value - except ValueError, TypeError: - pass - return None - def post(self): queue_status = QueueStatus() diff --git a/WebKitTools/QueueStatusServer/handlers/updatesvnrevision.py b/WebKitTools/QueueStatusServer/handlers/updatesvnrevision.py new file mode 100644 index 0000000..075982a --- /dev/null +++ b/WebKitTools/QueueStatusServer/handlers/updatesvnrevision.py @@ -0,0 +1,53 @@ +# Copyright (C) 2010 Google Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from google.appengine.ext import webapp, db +from google.appengine.ext.webapp import template + +import handlers +import model + + +class UpdateSVNRevision(handlers.UpdateBase): + def get(self): + self.response.out.write(template.render("templates/updatesvnrevision.html", None)) + + def post(self): + svn_revision_number = self._int_from_request("number") + + svn_revisions = model.SVNRevision.all().filter('number =', svn_revision_number).order('-date').fetch(1) + svn_revision = None + if svn_revisions: + svn_revision = svn_revisions[0] + else: + svn_revision = model.SVNRevision() + svn_revision.number = svn_revision_number + svn_revision.broken_bots.append(self.request.get("broken_bot")) + svn_revision.put() + + self.response.out.write(svn_revision.key().id()) diff --git a/WebKitTools/QueueStatusServer/index.yaml b/WebKitTools/QueueStatusServer/index.yaml index 60ba3df..94b6692 100644 --- a/WebKitTools/QueueStatusServer/index.yaml +++ b/WebKitTools/QueueStatusServer/index.yaml @@ -28,3 +28,9 @@ indexes: - name: queue_name - name: date direction: desc + +- kind: SVNRevision + properties: + - name: number + - name: date + direction: desc diff --git a/WebKitTools/QueueStatusServer/main.py b/WebKitTools/QueueStatusServer/main.py index 8efc771..8bfa7e9 100644 --- a/WebKitTools/QueueStatusServer/main.py +++ b/WebKitTools/QueueStatusServer/main.py @@ -40,7 +40,9 @@ from handlers.patchstatus import PatchStatus from handlers.recentstatus import RecentStatus from handlers.showresults import ShowResults from handlers.statusbubble import StatusBubble +from handlers.svnrevision import SVNRevision from handlers.updatestatus import UpdateStatus +from handlers.updatesvnrevision import UpdateSVNRevision webapp.template.register_template_library('filters.webkit_extras') @@ -52,8 +54,10 @@ routes = [ (r'/patch/(.*)', Patch), (r'/results/(.*)', ShowResults), (r'/status-bubble/(.*)', StatusBubble), + (r'/svn-revision/(.*)', SVNRevision), (r'/queue-status/(.*)', RecentStatus), ('/update-status', UpdateStatus), + ('/update-svn-revision', UpdateSVNRevision), ] application = webapp.WSGIApplication(routes, debug=True) diff --git a/WebKitTools/QueueStatusServer/model/__init__.py b/WebKitTools/QueueStatusServer/model/__init__.py index ef65bee..1eaa044 100644 --- a/WebKitTools/QueueStatusServer/model/__init__.py +++ b/WebKitTools/QueueStatusServer/model/__init__.py @@ -1 +1,3 @@ # Required for Python to search this directory for module files + +from model.svnrevision import SVNRevision diff --git a/WebKitTools/QueueStatusServer/model/queues.py b/WebKitTools/QueueStatusServer/model/queues.py index 8d48aff..57463de 100644 --- a/WebKitTools/QueueStatusServer/model/queues.py +++ b/WebKitTools/QueueStatusServer/model/queues.py @@ -27,10 +27,12 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. queues = [ + "commit-queue", "style-queue", "chromium-ews", + "cr-win-ews", "qt-ews", - "mac-ews", "gtk-ews", - "commit-queue", + "mac-ews", + "win-ews", ] diff --git a/WebKitTools/QueueStatusServer/model/svnrevision.py b/WebKitTools/QueueStatusServer/model/svnrevision.py new file mode 100644 index 0000000..70ec0cc --- /dev/null +++ b/WebKitTools/QueueStatusServer/model/svnrevision.py @@ -0,0 +1,34 @@ +# Copyright (C) 2010 Google Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from google.appengine.ext import db + +class SVNRevision(db.Model): + number = db.IntegerProperty() + broken_bots = db.StringListProperty(default=[]) + date = db.DateTimeProperty(auto_now_add=True) diff --git a/WebKitTools/QueueStatusServer/templates/dashboard.html b/WebKitTools/QueueStatusServer/templates/dashboard.html index 84ecabb..14b7ede 100644 --- a/WebKitTools/QueueStatusServer/templates/dashboard.html +++ b/WebKitTools/QueueStatusServer/templates/dashboard.html @@ -18,9 +18,11 @@ function statusDetail(patch_id) { <th>Bug</th> <th>Attachment</th> <th>Style</th> - <th>Chromium</th> + <th>Cr-Linux</th> + <th>Cr-Win</th> <th>Qt</th> <th>Mac</th> + <th>Win</th> <th>Gtk</th> <th>Commit</th> </tr> @@ -42,6 +44,10 @@ function statusDetail(patch_id) { onclick="statusDetail({{ summary.attachment_id }})" title="{{ summary.chromium_ews.status.date|timesince }} ago"{% endif %}> </td> + <td class="status {{ summary.cr_win_ews.state }}"{% if summary.cr_win_ews.status %} + onclick="statusDetail({{ summary.attachment_id }})" + title="{{ summary.cr_win_ews.status.date|timesince }} ago"{% endif %}> + </td> <td class="status {{ summary.qt_ews.state }}"{% if summary.qt_ews.status %} onclick="statusDetail({{ summary.attachment_id }})" title="{{ summary.qt_ews.status.date|timesince }} ago"{% endif %}> @@ -50,6 +56,10 @@ function statusDetail(patch_id) { onclick="statusDetail({{ summary.attachment_id }})" title="{{ summary.mac_ews.status.date|timesince }} ago"{% endif %}> </td> + <td class="status {{ summary.win_ews.state }}"{% if summary.win_ews.status %} + onclick="statusDetail({{ summary.attachment_id }})" + title="{{ summary.win_ews.status.date|timesince }} ago"{% endif %}> + </td> <td class="status {{ summary.gtk_ews.state }}"{% if summary.gtk_ews.status %} onclick="statusDetail({{ summary.attachment_id }})" title="{{ summary.gtk_ews.status.date|timesince }} ago"{% endif %}> diff --git a/WebKitTools/QueueStatusServer/templates/statusbubble.html b/WebKitTools/QueueStatusServer/templates/statusbubble.html index d1f331c..c6e2134 100644 --- a/WebKitTools/QueueStatusServer/templates/statusbubble.html +++ b/WebKitTools/QueueStatusServer/templates/statusbubble.html @@ -56,7 +56,12 @@ function statusDetail(patch_id) { <div class="status {{ summary.chromium_ews.state }}"{% if summary.chromium_ews.status %} onclick="statusDetail({{ summary.attachment_id }})" title="{{ summary.chromium_ews.status.date|timesince }} ago"{% endif %}> - chromium + cr-linux +</div> +<div class="status {{ summary.cr_win_ews.state }}"{% if summary.cr_win_ews.status %} + onclick="statusDetail({{ summary.attachment_id }})" + title="{{ summary.cr_win_ews.status.date|timesince }} ago"{% endif %}> + cr-win </div> <div class="status {{ summary.qt_ews.state }}"{% if summary.qt_ews.status %} onclick="statusDetail({{ summary.attachment_id }})" @@ -73,5 +78,10 @@ function statusDetail(patch_id) { title="{{ summary.mac_ews.status.date|timesince }} ago"{% endif %}> mac </div> +<div class="status {{ summary.win_ews.state }}"{% if summary.win_ews.status %} + onclick="statusDetail({{ summary.attachment_id }})" + title="{{ summary.win_ews.status.date|timesince }} ago"{% endif %}> + win +</div> </body> </html> diff --git a/WebKitTools/QueueStatusServer/templates/updatesvnrevision.html b/WebKitTools/QueueStatusServer/templates/updatesvnrevision.html new file mode 100644 index 0000000..6ea4e7b --- /dev/null +++ b/WebKitTools/QueueStatusServer/templates/updatesvnrevision.html @@ -0,0 +1,8 @@ +<form name="update_svn_revision" method="post"> +Update an SVN revision: <input name="number"> + <div> + Broken Bot: + <input name="broken_bot"> + </div> + <div><input type="submit" value="Update"></div> +</form> |