[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:50 UTC 2010


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

    2009-12-21  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            Update status-bubble to show all the queues
            https://bugs.webkit.org/show_bug.cgi?id=32838
    
            Also, move statusbubble over to use memcache.
    
            * QueueStatusServer/handlers/statusbubble.py:
            * QueueStatusServer/templates/statusbubble.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52455 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9778002..72dce34 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,18 @@
 
         Reviewed by Eric Seidel.
 
+        Update status-bubble to show all the queues
+        https://bugs.webkit.org/show_bug.cgi?id=32838
+
+        Also, move statusbubble over to use memcache.
+
+        * QueueStatusServer/handlers/statusbubble.py:
+        * QueueStatusServer/templates/statusbubble.html:
+
+2009-12-21  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
         Delete the boring "Empty queue" status messages in QueueStatusServer
         https://bugs.webkit.org/show_bug.cgi?id=32818
 
diff --git a/WebKitTools/QueueStatusServer/handlers/statusbubble.py b/WebKitTools/QueueStatusServer/handlers/statusbubble.py
index c33b3cc..d52509f 100644
--- a/WebKitTools/QueueStatusServer/handlers/statusbubble.py
+++ b/WebKitTools/QueueStatusServer/handlers/statusbubble.py
@@ -29,53 +29,14 @@
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp import template
 
-from model.queuestatus import QueueStatus
-
-
-# FIXME: This class is wrong.  I'm going to rebuid the functionality correctly
-#        for the dashboard and then kill this class.
-class StatusSummary(object):
-    def _status_to_code(self, status):
-        code_names = {
-            "Pass": "pass",
-            "Pending": "pending",
-            "Fail": "fail",
-            "Error": "error",
-        }
-        return code_names.get(status, "none")
-
-    def _queue_name_to_code(self, queue_name):
-        code_names = {
-            "style-queue": "style",
-        }
-        return code_names[queue_name]
-
-    queues = [
-        "style-queue",
-    ]
-
-    def __init__(self):
-        self._summary = {}
-
-    def summarize(self, attachment_id):
-        if self._summary.get(attachment_id):
-            return self._summary.get(attachment_id)
-
-        attachment_summary = {}
-        for queue in self.queues:
-            statuses = QueueStatus.all().filter('queue_name =', queue).filter('active_patch_id =', attachment_id).order('-date').fetch(1)
-            status_code = self._status_to_code(statuses[0].message if statuses else None)
-            queue_code = self._queue_name_to_code(queue)
-            attachment_summary[queue_code] = status_code
-
-        self._summary[attachment_id] = attachment_summary
-        return attachment_summary
+from model.attachment import Attachment
 
 
 class StatusBubble(webapp.RequestHandler):
     def get(self, attachment_id):
-        status_summary = StatusSummary()
+        attachment = Attachment(int(attachment_id))
+
         template_values = {
-            "queue_status" : status_summary.summarize(int(attachment_id)),
+            "summary" : attachment.summary()
         }
         self.response.out.write(template.render("templates/statusbubble.html", template_values))
diff --git a/WebKitTools/QueueStatusServer/templates/statusbubble.html b/WebKitTools/QueueStatusServer/templates/statusbubble.html
index f8959d9..cddf654 100644
--- a/WebKitTools/QueueStatusServer/templates/statusbubble.html
+++ b/WebKitTools/QueueStatusServer/templates/statusbubble.html
@@ -19,18 +19,51 @@ body {
 .pass {
     background-color: #8FDF5F;
     border: 1px solid #4F8530;
+    cursor: pointer;
 }
 .fail {
     background-color: #E98080;
     border: 1px solid #A77272;
+    cursor: pointer;
 }
 .pending {
     background-color: #FFFC6C;
     border: 1px solid #C5C56D;
+    cursor: pointer;
+}
+.error {
+  background-color: #E0B0FF;
+  border: 1px solid #ACA0B3;
+  cursor: pointer;
 }
 </style>
+<script>
+function statusDetail(patch_id) {
+  top.location = "/patch/" + patch_id
+}
+</script>
 </head>
-<body>{% for key, value in queue_status.items %}
-<div class="status {{value}}" title="{{key}}: {{value}}">{{key}}</div>{% endfor %}
+<body>
+<!-- FIXME: Find some way to remove this copy-and-paste code! -->
+<div class="status {{ summary.style_queue.state }}"{% if summary.style_queue.status %}
+    onclick="statusDetail({{ summary.attachment_id }})"
+    title="{{ summary.style_queue.status.date|timesince }}"{% endif %}>
+  style
+</div>
+<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
+</div>
+<div 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 %}>
+  qt
+</div>
+<div 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 %}>
+  gtk
+</div>
 </body>
 </html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list