Changeset 85383 in webkit
- Timestamp:
- Apr 29, 2011 7:50:58 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r85380 r85383 1 2011-04-29 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 land-safely patches should show show their place in the commit-queue 6 https://bugs.webkit.org/show_bug.cgi?id=59853 7 8 This complicated the "should we show the bubbles or the submit-to-ews button" 9 logic substantially. :( But now we'll show both the commit-queue position 10 as well as the submit-to-ews button for land-safely (cq+ only) patches. 11 Previously we would only show the submit-to-ews button. 12 13 * QueueStatusServer/handlers/statusbubble.py: 14 * QueueStatusServer/templates/statusbubble.html: 15 1 16 2011-04-29 Naoki Takano <takano.naoki@gmail.com> 2 17 -
trunk/Tools/QueueStatusServer/handlers/statusbubble.py
r85251 r85383 49 49 return bubble 50 50 51 def _have_ews_status_for(self, attachment, queue): 52 return bool(queue.is_ews() and (attachment.position_in_queue(queue) or attachment.status_for_queue(queue))) 51 def _have_status_for(self, attachment, queue): 52 # Any pending queue is shown. 53 if attachment.position_in_queue(queue): 54 return True 55 # Complete ewses are also shown. 56 return bool(queue.is_ews() and attachment.status_for_queue(queue)) 57 58 def _build_bubbles_for_attachment(self, attachment): 59 show_submit_to_ews = True 60 bubbles = [] 61 for queue in Queue.all(): 62 if not self._have_status_for(attachment, queue): 63 continue 64 bubbles.append(self._build_bubble(queue, attachment)) 65 # If even one ews has status, we don't show the submit-to-ews button. 66 if queue.is_ews(): 67 show_submit_to_ews = False 68 69 return (bubbles, show_submit_to_ews) 53 70 54 71 def get(self, attachment_id_string): 55 72 attachment_id = int(attachment_id_string) 56 73 attachment = Attachment(attachment_id) 57 # Show all queue positions, even the commit-queue. 58 bubbles = [self._build_bubble(queue, attachment) for queue in Queue.all() if queue.is_ews() or attachment.position_in_queue(queue)] 59 # If all EWS queues have no position and no status we show a "submit to ews" button. 60 have_ews_status_or_position = reduce(operator.or_, map(lambda queue: self._have_ews_status_for(attachment, queue), Queue.all())) 74 bubbles, show_submit_to_ews = self._build_bubbles_for_attachment(attachment) 75 61 76 template_values = { 62 77 "bubbles": bubbles, 63 78 "attachment_id": attachment_id, 64 "show_submit_to_ews": not have_ews_status_or_position,79 "show_submit_to_ews": show_submit_to_ews, 65 80 } 66 81 self.response.out.write(template.render("templates/statusbubble.html", template_values)) -
trunk/Tools/QueueStatusServer/templates/statusbubble.html
r85255 r85383 55 55 font-size: 9px; 56 56 } 57 form { 58 display: inline-block; 59 } 57 60 </style> 58 61 <script> … … 68 71 <body> 69 72 <div id="bubbleContainer"> 70 {% if show_submit_to_ews %}71 <form name="submit_to_ews" enctype="multipart/form-data" method="post" action="/submit-to-ews">72 <input type="hidden" name="attachment_id" value="{{ attachment_id }}">73 <input type="hidden" name="next_action" value="return_to_bubbles">74 <input class="status" type="submit" value="Submit for EWS analysis">75 </form>76 {% else %}77 73 {% for bubble in bubbles %} 78 74 <a class="status {{ bubble.state }}" target="_top" … … 88 84 </a> 89 85 {% endfor %} 86 87 {% if show_submit_to_ews %} 88 <form name="submit_to_ews" method="POST" action="/submit-to-ews"> 89 <input type="hidden" name="attachment_id" value="{{ attachment_id }}"> 90 <input type="hidden" name="next_action" value="return_to_bubbles"> 91 <input class="status" type="submit" value="Submit for EWS analysis"> 92 </form> 90 93 {% endif %} 91 94 </div> -
trunk/Tools/QueueStatusServer/templates/submittoews.html
r85251 r85383 1 <form name="submit_to_ews" enctype="multipart/form-data" method="post">1 <form name="submit_to_ews" method="POST"> 2 2 Attachment id of patch to submit: <input name="attachment_id"><input type="submit" value="Submit for EWS Processing"> 3 3 </form>
Note: See TracChangeset
for help on using the changeset viewer.