[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:44:19 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit f64a365a5a3b0a26782a536c97590934e0fbc5c7
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 21 02:42:46 2009 +0000

    2009-12-20  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            Prepare QueueStatusServer for new status messages
            https://bugs.webkit.org/show_bug.cgi?id=32805
    
            * QueueStatusServer/handlers/recentstatus.py:
            * QueueStatusServer/index.html: Removed.
            * QueueStatusServer/model/attachment.py:
            * QueueStatusServer/model/queues.py: Added.
            * QueueStatusServer/templates/recentstatus.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52429 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 614121c..d4b978f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-20  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        Prepare QueueStatusServer for new status messages
+        https://bugs.webkit.org/show_bug.cgi?id=32805
+
+        * QueueStatusServer/handlers/recentstatus.py:
+        * QueueStatusServer/index.html: Removed.
+        * QueueStatusServer/model/attachment.py:
+        * QueueStatusServer/model/queues.py: Added.
+        * QueueStatusServer/templates/recentstatus.html: Added.
+
 2009-12-20  Shinichiro Hamaji  <hamaji at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/QueueStatusServer/handlers/recentstatus.py b/WebKitTools/QueueStatusServer/handlers/recentstatus.py
index fb9ad2e..d1df78c 100644
--- a/WebKitTools/QueueStatusServer/handlers/recentstatus.py
+++ b/WebKitTools/QueueStatusServer/handlers/recentstatus.py
@@ -29,6 +29,7 @@
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp import template
 
+from model.queues import queues
 from model.queuestatus import QueueStatus
 
 class RecentStatus(webapp.RequestHandler):
@@ -43,14 +44,14 @@ class RecentStatus(webapp.RequestHandler):
     # We could change "/" to just redirect to /queue-status/commit-queue in the future
     # at which point we would not need a default value for queue_name here.
     def get(self, queue_name="commit-queue"):
-        statuses_query = QueueStatus.all().filter("queue_name =", queue_name).order("-date")
-        statuses = statuses_query.fetch(6)
-        if not statuses:
-            return self.response.out.write("No status to report.")
+        queue_status = {}
+        for queue in queues:
+            statuses = QueueStatus.all().filter("queue_name =", queue).order("-date").fetch(6)
+            if not statuses:
+                continue
+            queue_status[queue] = statuses
+
         template_values = {
-            "last_status" : statuses[0],
-            "recent_statuses" : statuses[1:],
-            "pretty_queue_name" : self._pretty_queue_name(queue_name),
-            "show_commit_queue_footer" : queue_name == "commit-queue"
+            "queue_status" : queue_status,
         }
-        self.response.out.write(template.render("index.html", template_values))
+        self.response.out.write(template.render("templates/recentstatus.html", template_values))
diff --git a/WebKitTools/QueueStatusServer/index.html b/WebKitTools/QueueStatusServer/index.html
deleted file mode 100644
index 3e4d832..0000000
--- a/WebKitTools/QueueStatusServer/index.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>WebKit {{ pretty_queue_name }} Status</title>
-    <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
-</head>
-<body>
-    <center>
-    <div id="current_status">
-        {{ last_status.message|force_escape|urlize|webkit_linkify|safe }}
-        <div id="last_status_date">As of {{ last_status.date|timesince }} ago</div>
-    </div>
-
-    <table id="recent_status_table">
-        <tr>
-            <th colspan=2>Recent Status</th>
-        </tr>
-        {% for recent_status in recent_statuses %}
-        <tr>
-            <td class='status_date'>{{ recent_status.date|timesince }} ago</td>
-            <td class="recent_status">{{ recent_status.message|force_escape|urlize|webkit_linkify|safe }}</td>
-            <td class="results_link">
-            {% if recent_status.results_file %}
-                [<a href="/results/{{ recent_status.key.id }}">results</a>]
-            {% endif %}
-            </td>
-        </tr>
-        {% endfor %}
-    </table>
-
-    <div id="footer">
-        {% if show_commit_queue_footer %}
-        <a href="https://bugs.webkit.org/buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=commit-queue%2B">queued bugs</a> | <a href="http://trac.webkit.org/wiki/CommitQueue">documentation</a> |
-        {% endif %}
-        <a href="http://webkit.org/">webkit.org</a>
-    </div>
-    </center>
-</body>
-</html>
diff --git a/WebKitTools/QueueStatusServer/model/attachment.py b/WebKitTools/QueueStatusServer/model/attachment.py
index 34b365f..712deaa 100644
--- a/WebKitTools/QueueStatusServer/model/attachment.py
+++ b/WebKitTools/QueueStatusServer/model/attachment.py
@@ -30,6 +30,7 @@ import re
 
 from google.appengine.api import memcache
 
+from model.queues import queues
 from model.queuestatus import QueueStatus
 
 
@@ -96,15 +97,6 @@ class Attachment(object):
             return summary
         summary["bug_id"] = first_status.active_bug_id
 
-        # FIXME: This should go somewhere else.
-        queues = [
-            "style-queue",
-            "chromium-ews",
-            "qt-ews",
-            "gtk-ews",
-            "commit-queue",
-        ]
-
         for queue in queues:
             summary[queue] = None
             status = QueueStatus.all().filter('queue_name =', queue).filter('active_patch_id =', self.id).order('-date').get()
diff --git a/WebKitTools/QueueStatusServer/model/queues.py b/WebKitTools/QueueStatusServer/model/queues.py
new file mode 100644
index 0000000..0af830b
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/model/queues.py
@@ -0,0 +1,35 @@
+# 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.
+
+queues = [
+    "style-queue",
+    "chromium-ews",
+    "qt-ews",
+    "gtk-ews",
+    "commit-queue",
+]
diff --git a/WebKitTools/QueueStatusServer/templates/recentstatus.html b/WebKitTools/QueueStatusServer/templates/recentstatus.html
new file mode 100644
index 0000000..a55e0a6
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/templates/recentstatus.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>WebKit Queue Status</title>
+<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
+</head>
+<body>
+<h1>WebKit Queue Status</h1>{% for queue_name, statuses in queue_status.items %}
+<div class="status-details">
+  <h2>{{ queue_name }}</h2>
+  <ul>{% for status in statuses %}
+    <li>{% if status.active_bug_id %}
+      <span class="status-bug">
+        Patch {{ status.active_patch_id|force_escape|webkit_attachment_id|safe }} from bug
+        {{ status.active_bug_id|force_escape|webkit_bug_id|safe }}:
+      </span>{% endif %}
+      <span class="status-message">{{ status.message|force_escape|urlize|webkit_linkify|safe }}</span>{% if status.results_file %}
+      <span class="status-results">[{{ status|results_link|safe }}]</span>{% endif %}
+      <span class="status-date">{{ status.date|timesince }} ago</span>
+    </li>{% endfor %}
+  </ul>
+</div>{% endfor %}
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list