Changeset 51591 in webkit
- Timestamp:
- Dec 2, 2009 1:11:54 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r51590 r51591 1 2009-12-02 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 [bzt] Implement status bubble view 6 https://bugs.webkit.org/show_bug.cgi?id=32057 7 8 The status bubble is a compact representation of the queue status for a 9 given patch. This will eventually help us reduce the comment spam from 10 the queues. 11 12 * QueueStatusServer/index.html: Added HTML5 doctype for sanity. 13 * QueueStatusServer/queue_status.py: 14 * QueueStatusServer/status_bubble.html: Added. 15 1 16 2009-12-02 Eric Seidel <eric@webkit.org> 2 17 -
trunk/WebKitTools/QueueStatusServer/index.html
r48730 r51591 1 <!DOCTYPE html> 1 2 <html> 2 3 <head> -
trunk/WebKitTools/QueueStatusServer/queue_status.py
r51446 r51591 74 74 75 75 76 class StatusSummary(object): 77 def _status_to_code(self, status): 78 code_names = { 79 "Pass": "pass", 80 "Pending": "pending", 81 "Fail": "fail", 82 "Error": "error", 83 } 84 return code_names.get(status, "none") 85 86 def _queue_name_to_code(self, queue_name): 87 code_names = { 88 "style-queue": "style", 89 } 90 return code_names[queue_name] 91 92 queues = [ 93 "style-queue", 94 ] 95 96 def __init__(self): 97 self._summary = {} 98 99 def summarize(self, attachment_id): 100 if self._summary.get(attachment_id): 101 return self._summary.get(attachment_id) 102 103 for queue in self.queues: 104 statuses = QueueStatus.all().filter('queue_name =', queue).filter('active_patch_id =', attachment_id).order('-date').fetch(1) 105 status_code = self._status_to_code(statuses[0].message if statuses else None) 106 queue_code = self._queue_name_to_code(queue) 107 attachment_summary[queue_code] = status_code 108 109 self._summary[attachment_id] = attachment_summary 110 return attachment_summary 111 112 113 class StatusBubble(webapp.RequestHandler): 114 def get(self, attachment_id): 115 status_summary = StatusSummary() 116 template_values = { 117 "queue_status" : status_summary.summarize(int(attachment_id)), 118 } 119 self.response.out.write(template.render('status_bubble.html', template_values)) 120 121 76 122 class UpdateStatus(webapp.RequestHandler): 77 123 def get(self): … … 106 152 ('/update-status', UpdateStatus), 107 153 (r'/patch-status/(.*)/(.*)', PatchStatus), 154 (r'/status-bubble/(.*)', StatusBubble), 108 155 ] 109 156
Note: See TracChangeset
for help on using the changeset viewer.