| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| body { |
| font-family: Verdana, sans-serif; |
| margin: 0px; |
| padding: 0px; |
| } |
| #bubbleContainer { |
| display: inline-block; |
| white-space: nowrap; |
| } |
| .status { |
| display: block; |
| float: left; |
| margin: 1px; |
| padding: 1px 2px; |
| -moz-border-radius: 5px; |
| -webkit-border-radius: 5px; |
| border-radius: 5px; |
| border: 1px solid rgba(1, 1, 1, 0.3); |
| background-color: white; |
| font-size: 11px; |
| cursor: pointer; |
| text-decoration: none; |
| color: black; |
| } |
| .status:hover { |
| border-color: rgba(1, 1, 1, 0.7); |
| } |
| .pass { |
| background-color: #8FDF5F; |
| } |
| .fail { |
| background-color: #E98080; |
| } |
| .started { |
| background-color: #E1F5FF; |
| } |
| .provisional-fail { |
| background-color: #FFAF05; |
| } |
| .error { |
| background-color: #E0B0FF; |
| } |
| .queue_position { |
| font-size: 9px; |
| } |
| form { |
| float: left; |
| display: block; |
| } |
| </style> |
| <script> |
| window.addEventListener("message", function(e) { |
| if (e.data === 'containerMetrics') { |
| var parentContainer = bubbleContainer.parentElement; |
| var originalWidth = parentContainer.style.width; |
| parentContainer.style.width = "1000px"; |
| var clientRect = bubbleContainer.getBoundingClientRect(); |
| parentContainer.style.width = originalWidth; |
| e.source.postMessage({'width': Math.ceil(clientRect.width), 'height': Math.ceil(clientRect.height)}, e.origin); |
| } else |
| console.log("Unknown postMessage: " + e.data); |
| }, false); |
| </script> |
| </head> |
| <body> |
| <div id="bubbleContainer"> |
| {% if show_failure_to_apply %} |
| <a class="status fail" target="_blank" |
| href="/patch/{{ patch_id }}" |
| title="None of the queues could apply the patch" |
| > |
| patch does not apply to trunk of repository |
| </a> |
| {% else %} |
| {% for bubble in bubbles %} |
| <a class="status {{ bubble.state }}" target="_blank" |
| {% if bubble.url %} |
| href="{{ bubble.url }}" |
| {% endif %} |
| {% if bubble.details_message %} |
| title="{{ bubble.details_message }}" |
| {% endif %} |
| > |
| {{ bubble.name }} |
| {% if bubble.queue_position %} |
| <span class="queue_position">#{{ bubble.queue_position }}</span> |
| {% endif %} |
| </a> |
| {% endfor %} |
| {% endif %} |
| |
| {% if show_submit_to_ews %} |
| <form name="submit_to_ews" method="POST" action="/submit-to-ews/">{% csrf_token %} |
| <input type="hidden" name="patch_id" value="{{ patch_id }}"> |
| <input type="hidden" name="next_action" value="return_to_bubbles"> |
| <input class="status" type="submit" value="Submit for EWS analysis"> |
| </form> |
| {% endif %} |
| |
| {% if show_retry_button %} |
| <form name="retry" method="POST" action="/retry/">{% csrf_token %} |
| <input type="hidden" name="patch_id" value="{{ patch_id }}"> |
| <input class="status" type="submit" value="↻ Retry failed builds"> |
| </form> |
| {% endif %} |
| |
| <script> |
| // Convert from UTC dates to local. |
| var bubbles = document.getElementsByClassName("status") |
| for (var i = 0; i < bubbles.length; ++i) { |
| var bubble = bubbles[i]; |
| if (bubble.hasAttribute("title")) { |
| var newTitle = bubble.getAttribute("title").replace(/\[\[(.+)\]\]/, function(match, isoDateString) { |
| return new Date(isoDateString).toString(); |
| }); |
| bubble.setAttribute("title", newTitle); |
| } |
| } |
| </script> |
| </div> |
| </body> |
| </html> |