[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

eric at webkit.org eric at webkit.org
Fri Jan 21 14:57:20 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 182b00067f7898c4803b277a7a791b8bdf234dfa
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 5 12:39:37 2011 +0000

    2011-01-05  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            queues.webkit.org should have per-bot status pages
            https://bugs.webkit.org/show_bug.cgi?id=51906
    
            Just adds a /queue-status/QUEUE_NAME/bots/BOT_ID page to show
            statuses from a single queue.  Now that we have many bots servicing
            some queues (commit-queue, win-ews, etc.) its easy to have the messages
            you care about scroll off the end of the 15-message limit on the main page.
    
            Eventually we should probably rename /queue-status to /queue or /queues,
            but that's fodder for another patch.
    
            * QueueStatusServer/handlers/queuestatus.py:
            * QueueStatusServer/index.yaml:
            * QueueStatusServer/main.py:
            * QueueStatusServer/templates/includes/singlequeuestatus.html:
             - This probably should use a custom filter instead of hard-coding
               the URL scheme here, but I couldn't figure out how to easily
               create such a filter.  Most filters work with "strings" so we can't
               pass the status object.  We could add a method to the status
               object and call that, but that seemed a bit strange too.
            * QueueStatusServer/templates/queuestatus.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75060 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 1a50bd8..0f8ec3a 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,29 @@
+2011-01-05  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        queues.webkit.org should have per-bot status pages
+        https://bugs.webkit.org/show_bug.cgi?id=51906
+
+        Just adds a /queue-status/QUEUE_NAME/bots/BOT_ID page to show
+        statuses from a single queue.  Now that we have many bots servicing
+        some queues (commit-queue, win-ews, etc.) its easy to have the messages
+        you care about scroll off the end of the 15-message limit on the main page.
+
+        Eventually we should probably rename /queue-status to /queue or /queues,
+        but that's fodder for another patch.
+
+        * QueueStatusServer/handlers/queuestatus.py:
+        * QueueStatusServer/index.yaml:
+        * QueueStatusServer/main.py:
+        * QueueStatusServer/templates/includes/singlequeuestatus.html:
+         - This probably should use a custom filter instead of hard-coding
+           the URL scheme here, but I couldn't figure out how to easily
+           create such a filter.  Most filters work with "strings" so we can't
+           pass the status object.  We could add a method to the status
+           object and call that, but that seemed a bit strange too.
+        * QueueStatusServer/templates/queuestatus.html:
+
 2011-01-05  Carlos Garcia Campos  <cgarcia at igalia.com>
 
         Unreviewed. Adding myself to the list of committers.
diff --git a/Tools/QueueStatusServer/handlers/queuestatus.py b/Tools/QueueStatusServer/handlers/queuestatus.py
index 54c0fdd..e5dc95f 100644
--- a/Tools/QueueStatusServer/handlers/queuestatus.py
+++ b/Tools/QueueStatusServer/handlers/queuestatus.py
@@ -56,17 +56,31 @@ class QueueStatus(webapp.RequestHandler):
     def _build_status_groups(self, statuses):
         return [list(group) for key, group in itertools.groupby(statuses, self._grouping_key_for_status)]
 
-    def get(self, queue_name):
+    def _fetch_statuses(self, queue, bot_id):
+        statuses = queuestatus.QueueStatus.all()
+        statuses = statuses.filter("queue_name =", queue.name())
+        if bot_id:
+            statuses.filter("bot_id =", bot_id)
+        return statuses.order("-date").fetch(15)
+
+    def _page_title(self, queue, bot_id):
+        title = "%s Messages" % queue.display_name()
+        if bot_id:
+            title += " from \"%s\"" % (bot_id)
+        return title
+
+    def get(self, queue_name, bot_id=None):
         queue_name = queue_name.lower()
         queue = Queue.queue_with_name(queue_name)
         if not queue:
             self.error(404)
             return
 
-        statuses = queuestatus.QueueStatus.all().filter("queue_name =", queue.name()).order("-date").fetch(15)
+        statuses = self._fetch_statuses(queue, bot_id)
         template_values = {
-            "display_queue_name": queue.display_name(),
+            "page_title": self._page_title(queue, bot_id),
             "work_item_rows": self._rows_for_work_items(queue),
             "status_groups": self._build_status_groups(statuses),
+            "bot_id": bot_id,
         }
         self.response.out.write(template.render("templates/queuestatus.html", template_values))
diff --git a/Tools/QueueStatusServer/index.yaml b/Tools/QueueStatusServer/index.yaml
index 6c9a3b2..9724760 100644
--- a/Tools/QueueStatusServer/index.yaml
+++ b/Tools/QueueStatusServer/index.yaml
@@ -25,6 +25,13 @@ indexes:
 
 - kind: QueueStatus
   properties:
+  - name: bot_id
+  - name: queue_name
+  - name: date
+    direction: desc
+
+- kind: QueueStatus
+  properties:
   - name: queue_name
   - name: date
 
diff --git a/Tools/QueueStatusServer/main.py b/Tools/QueueStatusServer/main.py
index 3fbee5c..446f36b 100644
--- a/Tools/QueueStatusServer/main.py
+++ b/Tools/QueueStatusServer/main.py
@@ -62,6 +62,7 @@ routes = [
     (r'/results/(.*)', ShowResults),
     (r'/status-bubble/(.*)', StatusBubble),
     (r'/svn-revision/(.*)', SVNRevision),
+    (r'/queue-status/(.*)/bots/(.*)', QueueStatus),
     (r'/queue-status/(.*)', QueueStatus),
     (r'/next-patch/(.*)', NextPatch),
     (r'/release-patch', ReleasePatch),
diff --git a/Tools/QueueStatusServer/templates/includes/singlequeuestatus.html b/Tools/QueueStatusServer/templates/includes/singlequeuestatus.html
index 0adbfbd..94393c0 100644
--- a/Tools/QueueStatusServer/templates/includes/singlequeuestatus.html
+++ b/Tools/QueueStatusServer/templates/includes/singlequeuestatus.html
@@ -1,6 +1,6 @@
 <span class="status-date">{{ status.date|timesince }} ago
 {% if status.bot_id %}
-({{ status.bot_id }})
+(<a href="/queue-status/{{status.queue_name}}/bots/{{status.bot_id}}">{{ status.bot_id }}</a>)
 {% endif %}
 </span>
 <span class="status-message">{{ status.message|force_escape|urlize|webkit_linkify|safe }}</span>
diff --git a/Tools/QueueStatusServer/templates/queuestatus.html b/Tools/QueueStatusServer/templates/queuestatus.html
index 1b98952..c68abf1 100644
--- a/Tools/QueueStatusServer/templates/queuestatus.html
+++ b/Tools/QueueStatusServer/templates/queuestatus.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>{{ display_queue_name }} Status</title>
+<title>{{ page_title }}</title>
 <link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
 </head>
 <body>
-<h1>{{ display_queue_name }} Status</h1>
+<h1>{{ page_title }}</h1>
 
 <h3>Recent Status</h3>
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list