[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
abarth at webkit.org
abarth at webkit.org
Tue Jan 5 23:56:09 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit fdd6b008a25596b41d7bac32dffbe8440528fa1b
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Dec 20 09:47:41 2009 +0000
2009-12-20 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
[QueueStatusServer] Add a per-patch details page
https://bugs.webkit.org/show_bug.cgi?id=32784
This is a first cut at a per-patch details page. I'm sure we'll have
to iterate.
* QueueStatusServer/filters/webkit_extras.py:
* QueueStatusServer/handlers/patch.py: Added.
* QueueStatusServer/index.yaml:
* QueueStatusServer/main.py:
* QueueStatusServer/model/attachment.py:
* QueueStatusServer/stylesheets/dashboard.css:
* QueueStatusServer/templates/dashboard.html:
* QueueStatusServer/templates/patch.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 182b28b..0cc662a 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,25 @@
Reviewed by Eric Seidel.
+ [QueueStatusServer] Add a per-patch details page
+ https://bugs.webkit.org/show_bug.cgi?id=32784
+
+ This is a first cut at a per-patch details page. I'm sure we'll have
+ to iterate.
+
+ * QueueStatusServer/filters/webkit_extras.py:
+ * QueueStatusServer/handlers/patch.py: Added.
+ * QueueStatusServer/index.yaml:
+ * QueueStatusServer/main.py:
+ * QueueStatusServer/model/attachment.py:
+ * QueueStatusServer/stylesheets/dashboard.css:
+ * QueueStatusServer/templates/dashboard.html:
+ * QueueStatusServer/templates/patch.html: Added.
+
+2009-12-20 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
Use memcache to make dashboard to fast
https://bugs.webkit.org/show_bug.cgi?id=32780
diff --git a/WebKitTools/QueueStatusServer/filters/webkit_extras.py b/WebKitTools/QueueStatusServer/filters/webkit_extras.py
index 6a855cc..801da56 100644
--- a/WebKitTools/QueueStatusServer/filters/webkit_extras.py
+++ b/WebKitTools/QueueStatusServer/filters/webkit_extras.py
@@ -26,30 +26,34 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import re
+
from django.template.defaultfilters import stringfilter
from google.appengine.ext import webapp
-import re
+register = webapp.template.create_template_register()
bug_regexp = re.compile(r"bug (?P<bug_id>\d+)")
patch_regexp = re.compile(r"patch (?P<patch_id>\d+)")
+ at register.filter
@stringfilter
def webkit_linkify(value):
value = bug_regexp.sub(r'<a href="http://webkit.org/b/\g<bug_id>">bug \g<bug_id></a>', value)
value = patch_regexp.sub(r'<a href="https://bugs.webkit.org/attachment.cgi?id=\g<patch_id>&action=prettypatch">patch \g<patch_id></a>', value)
return value
+ at register.filter
@stringfilter
def webkit_bug_id(value):
return '<a href="http://webkit.org/b/' + value + '">' + value + '</a>'
+ at register.filter
@stringfilter
def webkit_attachment_id(value):
return '<a href="https://bugs.webkit.org/attachment.cgi?id=' + value + '&action=prettypatch">' + value + '</a>'
-register = webapp.template.create_template_register()
-register.filter(webkit_linkify)
-register.filter(webkit_bug_id)
-register.filter(webkit_attachment_id)
-
+ at register.filter
+ at stringfilter
+def results_link(status):
+ return '<a href="/results/' + status.key().id() + '">results</a>'
diff --git a/WebKitTools/QueueStatusServer/handlers/patch.py b/WebKitTools/QueueStatusServer/handlers/patch.py
new file mode 100644
index 0000000..3219212
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/patch.py
@@ -0,0 +1,53 @@
+# 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
+from google.appengine.ext.webapp import template
+
+from model.queuestatus import QueueStatus
+
+
+class Patch(webapp.RequestHandler):
+ def get(self, attachment_id_string):
+ attachment_id = int(attachment_id_string)
+ statuses = QueueStatus.all().filter("active_patch_id =", attachment_id).order("-date")
+
+ bug_id = None
+ queue_status = {}
+ for status in statuses:
+ bug_id = status.active_bug_id # Should be the same for every status.
+ per_queue_statuses = queue_status.get(status.queue_name, [])
+ per_queue_statuses.append(status)
+ queue_status[status.queue_name] = per_queue_statuses
+
+ template_values = {
+ "attachment_id" : attachment_id,
+ "bug_id" : bug_id,
+ "queue_status" : queue_status,
+ }
+ self.response.out.write(template.render("templates/patch.html", template_values))
diff --git a/WebKitTools/QueueStatusServer/index.yaml b/WebKitTools/QueueStatusServer/index.yaml
index bf11262..60ba3df 100644
--- a/WebKitTools/QueueStatusServer/index.yaml
+++ b/WebKitTools/QueueStatusServer/index.yaml
@@ -13,6 +13,12 @@ indexes:
- kind: QueueStatus
properties:
- name: active_patch_id
+ - name: date
+ direction: desc
+
+- kind: QueueStatus
+ properties:
+ - name: active_patch_id
- name: queue_name
- name: date
direction: desc
diff --git a/WebKitTools/QueueStatusServer/main.py b/WebKitTools/QueueStatusServer/main.py
index c565be8..3bc6092 100644
--- a/WebKitTools/QueueStatusServer/main.py
+++ b/WebKitTools/QueueStatusServer/main.py
@@ -34,6 +34,7 @@ from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from handlers.dashboard import Dashboard
+from handlers.patch import Patch
from handlers.patchstatus import PatchStatus
from handlers.recentstatus import RecentStatus
from handlers.showresults import ShowResults
@@ -48,6 +49,7 @@ routes = [
('/update-status', UpdateStatus),
('/dashboard', Dashboard),
(r'/patch-status/(.*)/(.*)', PatchStatus),
+ (r'/patch/(.*)', Patch),
(r'/status-bubble/(.*)', StatusBubble),
(r'/results/(.*)', ShowResults)
]
diff --git a/WebKitTools/QueueStatusServer/model/attachment.py b/WebKitTools/QueueStatusServer/model/attachment.py
index cc8fbfe..34b365f 100644
--- a/WebKitTools/QueueStatusServer/model/attachment.py
+++ b/WebKitTools/QueueStatusServer/model/attachment.py
@@ -78,8 +78,14 @@ class Attachment(object):
table = {
"Pass" : "pass",
"Fail" : "fail",
+ "Error" : "error",
}
- return table.get(status.message, "none")
+ state = table.get(status.message)
+ if state:
+ return state
+ if status:
+ return "pending"
+ return None
def _fetch_summary(self):
summary = { "attachment_id" : self.id }
@@ -96,6 +102,7 @@ class Attachment(object):
"chromium-ews",
"qt-ews",
"gtk-ews",
+ "commit-queue",
]
for queue in queues:
diff --git a/WebKitTools/QueueStatusServer/stylesheets/dashboard.css b/WebKitTools/QueueStatusServer/stylesheets/dashboard.css
index 7215552..1ecf2eb 100644
--- a/WebKitTools/QueueStatusServer/stylesheets/dashboard.css
+++ b/WebKitTools/QueueStatusServer/stylesheets/dashboard.css
@@ -1,13 +1,34 @@
body {
font-family: Verdana, Helvetica, sans-serif;
+ width: 600px;
+ padding: 0px;
+ color: #444;
}
h1 {
+ background-color: #EEE;
color: #444;
font-size: 14pt;
font-style: italic;
+ margin: 0px;
+ padding: 5px;
+}
+h2 {
+ background-color: #AAA;
+ color: white;
+ font-weight: bold;
+ font-size: 9pt;
+ margin: 0px;
+ padding: 5px;
+}
+ul {
+ margin: 0px;
+ padding: 0px;
+ list-style: none;
+}
+li {
+ padding: 5px;
}
table {
- color: #444;
border-spacing: 0px;
}
th {
@@ -15,18 +36,23 @@ th {
color: white;
padding: 5px;
width: 100px;
- font-size: 11px;
+ font-size: 9pt;
}
td {
text-align: center;
}
-tr:hover {
+tr:hover, li:hover {
background-color: #EEE;
}
+.status-date {
+ color: #AAA;
+ float: right;
+ font-size: 8pt;
+}
.status {
margin: 1px;
padding: 1px 2px;
- font-size: 11px;
+ font-size: 9pt;
border: 1px solid transparent;
}
.status:hover {
@@ -34,13 +60,21 @@ tr:hover {
}
.pass {
background-color: #8FDF5F;
+ cursor: pointer;
/* border: 1px solid #4F8530; */
}
.fail {
background-color: #E98080;
+ cursor: pointer;
/* border: 1px solid #A77272; */
}
.pending {
background-color: #FFFC6C;
+ cursor: pointer;
/* border: 1px solid #C5C56D; */
}
+.error {
+ background-color: #E0B0FF;
+ cursor: pointer;
+ /* border: 1px solid #ACA0B3; */
+}
diff --git a/WebKitTools/QueueStatusServer/templates/dashboard.html b/WebKitTools/QueueStatusServer/templates/dashboard.html
index aa52053..56dbb9a 100644
--- a/WebKitTools/QueueStatusServer/templates/dashboard.html
+++ b/WebKitTools/QueueStatusServer/templates/dashboard.html
@@ -1,7 +1,14 @@
<!DOCTYPE html>
<html>
<head>
+<title>WebKit Bot Status</title>
<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
+<script>
+function statusDetail(patch_id) {
+ // FIXME: We'd like to use AJAX to show the details on this page.
+ window.location = "/patch/" + patch_id
+}
+</script>
</head>
<body>
<h1>WebKit Bot Status</h1>
@@ -14,9 +21,10 @@
<th>Chromium</th>
<th>Qt</th>
<th>Gtk</th>
+ <th>Commit</th>
</tr>
- </thead>{% for summary in summaries %}
- <tbody>
+ </thead>
+ <tbody>{% for summary in summaries %}
<tr>
<td class="status">
{{ summary.bug_id|force_escape|webkit_bug_id|safe }}
@@ -24,21 +32,26 @@
<td class="status">
{{ summary.attachment_id|force_escape|webkit_attachment_id|safe }}
</td>
- <td class="status {{ summary.style_queue.state|safe }}"
- title="{{ summary.style_queue.status.date|timesince }} ago">
- {{ summary.style_queue.status.message|safe }}
+ <!-- FIXME: Find some way to remove this copy-and-paste code! -->
+ <td class="status {{ summary.style_queue.state }}"{% if summary.style_queue.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.style_queue.status.date|timesince }}"{% endif %}>
</td>
- <td class="status {{ summary.chromium_ews.state|safe }}"
- title="{{ summary.chromium_ews.status.date|timesince }} ago">
- {{ summary.chromium_ews.status.message|safe }}
+ <td 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 %}>
</td>
- <td class="status {{ summary.qt_ews.state|safe }}"
- title="{{ summary.qt_ews.status.date|timesince }} ago">
- {{ summary.qt_ews.status.message|safe }}
+ <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 %}>
</td>
- <td class="status {{ summary.gtk_ews.state|safe }}"
- title="{{ summary.gtk_ews.status.date|timesince }} ago"
- {{ summary.gtk_ews.status.message|safe }}
+ <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 %}>
+ </td>
+ <td class="status {{ summary.commit_queue.state }}"{% if summary.commit_queue.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.commit_queue.status.date|timesince }} ago"{% endif %}>
</td>
</tr>{% endfor %}
</tbody>
diff --git a/WebKitTools/QueueStatusServer/templates/patch.html b/WebKitTools/QueueStatusServer/templates/patch.html
new file mode 100644
index 0000000..e2ffd8d
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/templates/patch.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Patch Status</title>
+<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
+</head>
+<body>
+<h1>
+ Patch {{ attachment_id|force_escape|webkit_attachment_id|safe }} (Bug {{ bug_id|force_escape|webkit_bug_id|safe }})
+</h1>{% for queue_name, statuses in queue_status.items %}
+<div class="status-details">
+ <h2>{{ queue_name }}</h2>
+ <ul>{% for status in statuses %}
+ <li>
+ <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 %}
+</html>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list