Changeset 52405 in webkit
- Timestamp:
- Dec 20, 2009 1:47:41 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 1 added
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r52404 r52405 1 2009-12-20 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 [QueueStatusServer] Add a per-patch details page 6 https://bugs.webkit.org/show_bug.cgi?id=32784 7 8 This is a first cut at a per-patch details page. I'm sure we'll have 9 to iterate. 10 11 * QueueStatusServer/filters/webkit_extras.py: 12 * QueueStatusServer/handlers/patch.py: Added. 13 * QueueStatusServer/index.yaml: 14 * QueueStatusServer/main.py: 15 * QueueStatusServer/model/attachment.py: 16 * QueueStatusServer/stylesheets/dashboard.css: 17 * QueueStatusServer/templates/dashboard.html: 18 * QueueStatusServer/templates/patch.html: Added. 19 1 20 2009-12-20 Adam Barth <abarth@webkit.org> 2 21 -
trunk/WebKitTools/QueueStatusServer/filters/webkit_extras.py
r52396 r52405 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 import re 30 29 31 from django.template.defaultfilters import stringfilter 30 32 from google.appengine.ext import webapp 31 33 32 import re 34 register = webapp.template.create_template_register() 33 35 34 36 bug_regexp = re.compile(r"bug (?P<bug_id>\d+)") 35 37 patch_regexp = re.compile(r"patch (?P<patch_id>\d+)") 36 38 39 @register.filter 37 40 @stringfilter 38 41 def webkit_linkify(value): … … 41 44 return value 42 45 46 @register.filter 43 47 @stringfilter 44 48 def webkit_bug_id(value): 45 49 return '<a href="http://webkit.org/b/' + value + '">' + value + '</a>' 46 50 51 @register.filter 47 52 @stringfilter 48 53 def webkit_attachment_id(value): 49 54 return '<a href="https://bugs.webkit.org/attachment.cgi?id=' + value + '&action=prettypatch">' + value + '</a>' 50 55 51 register = webapp.template.create_template_register() 52 register.filter(webkit_linkify) 53 register.filter(webkit_bug_id) 54 register.filter(webkit_attachment_id) 55 56 @register.filter 57 @stringfilter 58 def results_link(status): 59 return '<a href="/results/' + status.key().id() + '">results</a>' -
trunk/WebKitTools/QueueStatusServer/handlers/patch.py
r52404 r52405 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from django.template.defaultfilters import stringfilter30 29 from google.appengine.ext import webapp 30 from google.appengine.ext.webapp import template 31 31 32 import re 32 from model.queuestatus import QueueStatus 33 33 34 bug_regexp = re.compile(r"bug (?P<bug_id>\d+)")35 patch_regexp = re.compile(r"patch (?P<patch_id>\d+)")36 34 37 @stringfilter 38 def webkit_linkify(value): 39 value = bug_regexp.sub(r'<a href="http://webkit.org/b/\g<bug_id>">bug \g<bug_id></a>', value) 40 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) 41 return value 35 class Patch(webapp.RequestHandler): 36 def get(self, attachment_id_string): 37 attachment_id = int(attachment_id_string) 38 statuses = QueueStatus.all().filter("active_patch_id =", attachment_id).order("-date") 42 39 43 @stringfilter 44 def webkit_bug_id(value): 45 return '<a href="http://webkit.org/b/' + value + '">' + value + '</a>' 40 bug_id = None 41 queue_status = {} 42 for status in statuses: 43 bug_id = status.active_bug_id # Should be the same for every status. 44 per_queue_statuses = queue_status.get(status.queue_name, []) 45 per_queue_statuses.append(status) 46 queue_status[status.queue_name] = per_queue_statuses 46 47 47 @stringfilter 48 def webkit_attachment_id(value): 49 return '<a href="https://bugs.webkit.org/attachment.cgi?id=' + value + '&action=prettypatch">' + value + '</a>' 50 51 register = webapp.template.create_template_register() 52 register.filter(webkit_linkify) 53 register.filter(webkit_bug_id) 54 register.filter(webkit_attachment_id) 55 48 template_values = { 49 "attachment_id" : attachment_id, 50 "bug_id" : bug_id, 51 "queue_status" : queue_status, 52 } 53 self.response.out.write(template.render("templates/patch.html", template_values)) -
trunk/WebKitTools/QueueStatusServer/index.yaml
r51264 r52405 14 14 properties: 15 15 - name: active_patch_id 16 - name: date 17 direction: desc 18 19 - kind: QueueStatus 20 properties: 21 - name: active_patch_id 16 22 - name: queue_name 17 23 - name: date -
trunk/WebKitTools/QueueStatusServer/main.py
r52396 r52405 35 35 36 36 from handlers.dashboard import Dashboard 37 from handlers.patch import Patch 37 38 from handlers.patchstatus import PatchStatus 38 39 from handlers.recentstatus import RecentStatus … … 49 50 ('/dashboard', Dashboard), 50 51 (r'/patch-status/(.*)/(.*)', PatchStatus), 52 (r'/patch/(.*)', Patch), 51 53 (r'/status-bubble/(.*)', StatusBubble), 52 54 (r'/results/(.*)', ShowResults) -
trunk/WebKitTools/QueueStatusServer/model/attachment.py
r52404 r52405 79 79 "Pass" : "pass", 80 80 "Fail" : "fail", 81 "Error" : "error", 81 82 } 82 return table.get(status.message, "none") 83 state = table.get(status.message) 84 if state: 85 return state 86 if status: 87 return "pending" 88 return None 83 89 84 90 def _fetch_summary(self): … … 97 103 "qt-ews", 98 104 "gtk-ews", 105 "commit-queue", 99 106 ] 100 107 -
trunk/WebKitTools/QueueStatusServer/stylesheets/dashboard.css
r52398 r52405 1 1 body { 2 2 font-family: Verdana, Helvetica, sans-serif; 3 width: 600px; 4 padding: 0px; 5 color: #444; 3 6 } 4 7 h1 { 8 background-color: #EEE; 5 9 color: #444; 6 10 font-size: 14pt; 7 11 font-style: italic; 12 margin: 0px; 13 padding: 5px; 14 } 15 h2 { 16 background-color: #AAA; 17 color: white; 18 font-weight: bold; 19 font-size: 9pt; 20 margin: 0px; 21 padding: 5px; 22 } 23 ul { 24 margin: 0px; 25 padding: 0px; 26 list-style: none; 27 } 28 li { 29 padding: 5px; 8 30 } 9 31 table { 10 color: #444;11 32 border-spacing: 0px; 12 33 } … … 16 37 padding: 5px; 17 38 width: 100px; 18 font-size: 11px;39 font-size: 9pt; 19 40 } 20 41 td { 21 42 text-align: center; 22 43 } 23 tr:hover {44 tr:hover, li:hover { 24 45 background-color: #EEE; 46 } 47 .status-date { 48 color: #AAA; 49 float: right; 50 font-size: 8pt; 25 51 } 26 52 .status { 27 53 margin: 1px; 28 54 padding: 1px 2px; 29 font-size: 11px;55 font-size: 9pt; 30 56 border: 1px solid transparent; 31 57 } … … 35 61 .pass { 36 62 background-color: #8FDF5F; 63 cursor: pointer; 37 64 /* border: 1px solid #4F8530; */ 38 65 } 39 66 .fail { 40 67 background-color: #E98080; 68 cursor: pointer; 41 69 /* border: 1px solid #A77272; */ 42 70 } 43 71 .pending { 44 72 background-color: #FFFC6C; 73 cursor: pointer; 45 74 /* border: 1px solid #C5C56D; */ 46 75 } 76 .error { 77 background-color: #E0B0FF; 78 cursor: pointer; 79 /* border: 1px solid #ACA0B3; */ 80 } -
trunk/WebKitTools/QueueStatusServer/templates/dashboard.html
r52398 r52405 2 2 <html> 3 3 <head> 4 <title>WebKit Bot Status</title> 4 5 <link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" /> 6 <script> 7 function statusDetail(patch_id) { 8 // FIXME: We'd like to use AJAX to show the details on this page. 9 window.location = "/patch/" + patch_id 10 } 11 </script> 5 12 </head> 6 13 <body> … … 15 22 <th>Qt</th> 16 23 <th>Gtk</th> 24 <th>Commit</th> 17 25 </tr> 18 </thead> {% for summary in summaries %}19 <tbody> 26 </thead> 27 <tbody>{% for summary in summaries %} 20 28 <tr> 21 29 <td class="status"> … … 25 33 {{ summary.attachment_id|force_escape|webkit_attachment_id|safe }} 26 34 </td> 27 <td class="status {{ summary.style_queue.state|safe }}" 28 title="{{ summary.style_queue.status.date|timesince }} ago"> 29 {{ summary.style_queue.status.message|safe }} 35 <!-- FIXME: Find some way to remove this copy-and-paste code! --> 36 <td class="status {{ summary.style_queue.state }}"{% if summary.style_queue.status %} 37 onclick="statusDetail({{ summary.attachment_id }})" 38 title="{{ summary.style_queue.status.date|timesince }}"{% endif %}> 30 39 </td> 31 <td class="status {{ summary.chromium_ews.state |safe }}"32 title="{{ summary.chromium_ews.status.date|timesince }} ago">33 {{ summary.chromium_ews.status.message|safe }}40 <td class="status {{ summary.chromium_ews.state }}"{% if summary.chromium_ews.status %} 41 onclick="statusDetail({{ summary.attachment_id }})" 42 title="{{ summary.chromium_ews.status.date|timesince }} ago"{% endif %}> 34 43 </td> 35 <td class="status {{ summary.qt_ews.state |safe }}"36 title="{{ summary.qt_ews.status.date|timesince }} ago">37 {{ summary.qt_ews.status.message|safe }}44 <td class="status {{ summary.qt_ews.state }}"{% if summary.qt_ews.status %} 45 onclick="statusDetail({{ summary.attachment_id }})" 46 title="{{ summary.qt_ews.status.date|timesince }} ago"{% endif %}> 38 47 </td> 39 <td class="status {{ summary.gtk_ews.state|safe }}" 40 title="{{ summary.gtk_ews.status.date|timesince }} ago" 41 {{ summary.gtk_ews.status.message|safe }} 48 <td class="status {{ summary.gtk_ews.state }}"{% if summary.gtk_ews.status %} 49 onclick="statusDetail({{ summary.attachment_id }})" 50 title="{{ summary.gtk_ews.status.date|timesince }} ago"{% endif %}> 51 </td> 52 <td class="status {{ summary.commit_queue.state }}"{% if summary.commit_queue.status %} 53 onclick="statusDetail({{ summary.attachment_id }})" 54 title="{{ summary.commit_queue.status.date|timesince }} ago"{% endif %}> 42 55 </td> 43 56 </tr>{% endfor %}
Note: See TracChangeset
for help on using the changeset viewer.