<!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 {
    display: inline-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="_top"
      href="/patch/{{ attachment_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="_top"
      href="/patch/{{ bubble.attachment_id }}/{{ bubble.queue_name }}"
  {% 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">
    <input type="hidden" name="attachment_id" value="{{ attachment_id }}">
    <input type="hidden" name="next_action" value="return_to_bubbles">
    <input class="status" type="submit" value="Submit for EWS analysis">
  </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>
