<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174087] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174087">174087</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2014-09-29 14:55:04 -0700 (Mon, 29 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Improve Bugzilla status bubbles
https://bugs.webkit.org/show_bug.cgi?id=137232

Reviewed by Ryosuke Niwa.

* QueueStatusServer/app.yaml: Will update again with an actual version when landing.

* QueueStatusServer/handlers/statusbubble.py: Eliminated yellow color, added
blue and orange. Significantly extended tooltips. Made bubbles show up even for queues
that are stuck, as it was only confusing that they disappeared after 99.

* QueueStatusServer/model/attachment.py: Removed functionality that was only used
by old bubbles. We need a lot more information to determine color, so the implementation
can not be here.

* QueueStatusServer/templates/statusbubble.html: Updated colors in CSS, made bubbles
always have a link for consistency. Added code to convert timestamps in tooltips
to local time zone.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsQueueStatusServerappyaml">trunk/Tools/QueueStatusServer/app.yaml</a></li>
<li><a href="#trunkToolsQueueStatusServerhandlersstatusbubblepy">trunk/Tools/QueueStatusServer/handlers/statusbubble.py</a></li>
<li><a href="#trunkToolsQueueStatusServermodelattachmentpy">trunk/Tools/QueueStatusServer/model/attachment.py</a></li>
<li><a href="#trunkToolsQueueStatusServertemplatesstatusbubblehtml">trunk/Tools/QueueStatusServer/templates/statusbubble.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (174086 => 174087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-09-29 21:26:06 UTC (rev 174086)
+++ trunk/Tools/ChangeLog        2014-09-29 21:55:04 UTC (rev 174087)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-09-29  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Improve Bugzilla status bubbles
+        https://bugs.webkit.org/show_bug.cgi?id=137232
+
+        Reviewed by Ryosuke Niwa.
+
+        * QueueStatusServer/app.yaml: Will update again with an actual version when landing.
+
+        * QueueStatusServer/handlers/statusbubble.py: Eliminated yellow color, added
+        blue and orange. Significantly extended tooltips. Made bubbles show up even for queues
+        that are stuck, as it was only confusing that they disappeared after 99.
+
+        * QueueStatusServer/model/attachment.py: Removed functionality that was only used
+        by old bubbles. We need a lot more information to determine color, so the implementation
+        can not be here.
+
+        * QueueStatusServer/templates/statusbubble.html: Updated colors in CSS, made bubbles
+        always have a link for consistency. Added code to convert timestamps in tooltips
+        to local time zone.
+
</ins><span class="cx"> 2014-09-29  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r174045.
</span></span></pre></div>
<a id="trunkToolsQueueStatusServerappyaml"></a>
<div class="modfile"><h4>Modified: trunk/Tools/QueueStatusServer/app.yaml (174086 => 174087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/QueueStatusServer/app.yaml        2014-09-29 21:26:06 UTC (rev 174086)
+++ trunk/Tools/QueueStatusServer/app.yaml        2014-09-29 21:55:04 UTC (rev 174087)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> application: webkit-queues
</span><del>-version: 174015 # Bugzilla bug ID of last major change
</del><ins>+version: 174087 # Bugzilla bug ID of last major change
</ins><span class="cx"> runtime: python
</span><span class="cx"> api_version: 1
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsQueueStatusServerhandlersstatusbubblepy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/QueueStatusServer/handlers/statusbubble.py (174086 => 174087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/QueueStatusServer/handlers/statusbubble.py        2014-09-29 21:26:06 UTC (rev 174086)
+++ trunk/Tools/QueueStatusServer/handlers/statusbubble.py        2014-09-29 21:55:04 UTC (rev 174087)
</span><span class="lines">@@ -32,41 +32,151 @@
</span><span class="cx"> from google.appengine.ext.webapp import template
</span><span class="cx"> 
</span><span class="cx"> from model.attachment import Attachment
</span><ins>+from model.activeworkitems import ActiveWorkItems
+from model.patchlog import PatchLog
+from model.queues import Queue
+from model.queuestatus import QueueStatus
</ins><span class="cx"> from model.workitems import WorkItems
</span><del>-from model.queues import Queue
</del><ins>+from sets import Set
</ins><span class="cx"> 
</span><ins>+progress_statuses = Set([
+    &quot;Cleaned working directory&quot;,
+    &quot;Updated working directory&quot;,
+    &quot;Applied patch&quot;,
+    &quot;Built patch&quot;,
+    &quot;Watchlist applied&quot;,
+    &quot;Style checked&quot;,
+    &quot;ChangeLog validated&quot;,
+    &quot;Built patch&quot;,
+    &quot;Able to build without patch&quot;,
+    &quot;Passed tests&quot;,
+    &quot;Able to pass tests without patch&quot;,
+    &quot;Landed patch&quot;
+])
</ins><span class="cx"> 
</span><span class="cx"> class StatusBubble(webapp.RequestHandler):
</span><ins>+    def _iso_time(self, time):
+        return &quot;[[&quot; + time.isoformat() + &quot;]]&quot;
+
+    # queue_position includes items that are already active, so it's misleading.
+    # For a queue that has 8 bots, being #9 in the queue actually means being #1.
+    def _real_queue_position(self, queue, queue_position):
+        active_work_items = queue.active_work_items().item_ids
+        if active_work_items:
+            return queue_position - len(active_work_items)
+        else:
+            return queue_position
+
+    def _latest_resultative_status(self, statuses):
+        for status in statuses:
+            if not status.message in progress_statuses:
+                return status
+        return None
+
+    def _build_message_for_provisional_failure(self, queue, attachment, queue_position, statuses):
+        patch_log = PatchLog.lookup_if_exists(attachment.id, queue.name())
+        if not patch_log:
+            return &quot;Internal error. No PatchLog entry in database.&quot;
+
+        is_active = attachment.id in queue.active_work_items().item_ids
+        try_count = patch_log.retry_count + (not is_active)  # retry_count is updated when a new attempt starts.
+        latest_resultative_status = self._latest_resultative_status(statuses)
+        tree_is_red = latest_resultative_status.message == &quot;Unable to pass tests without patch (tree is red?)&quot; or latest_resultative_status.message == &quot;Unable to build without patch&quot;
+
+        message = latest_resultative_status.message + &quot;.&quot;
+        if is_active:
+            if tree_is_red:
+                message += &quot;\n\nTrying again now.&quot;
+            else:
+                message += &quot;\n\nThis result is not final, as the issue could be a pre-existing one. Trying to determine that now.&quot;
+                if try_count == 1:
+                    message += &quot;\n\nPreviously completed a round of testing, but couldn't arrive to a definitive conclusion.&quot;
+                elif try_count &gt; 1:
+                    message += &quot;\n\nPreviously completed &quot; + str(try_count) + &quot; rounds of testing, but couldn't arrive to a definitive conclusion.&quot;
+        else:
+            real_queue_position = self._real_queue_position(queue, queue_position)
+            if tree_is_red:
+                message += &quot;\n\nWill try again, currently #&quot; + str(real_queue_position) + &quot; in queue.&quot;
+            else:
+                message += &quot;\n\nThis result is not final, as the issue can be a pre-existing one. &quot;
+                if try_count == 1:
+                    message += &quot;Completed one round &quot;
+                else:
+                    message += &quot;Completed &quot; + str(try_count) + &quot; rounds &quot;
+                message += &quot;of testing trying to determine that, but couldn't arrive to a definitive conclusion yet.\n\nWill try again, currently #&quot; + str(real_queue_position) + &quot; in queue.&quot;
+        message += &quot;\n\nPlease click the bubble for detailed results.\n\n&quot; + self._iso_time(statuses[0].date)
+        return message
+
</ins><span class="cx">     def _build_bubble(self, queue, attachment, queue_position):
</span><del>-        queue_status = attachment.status_for_queue(queue)
</del><span class="cx">         bubble = {
</span><span class="cx">             &quot;name&quot;: queue.short_name().lower(),
</span><span class="cx">             &quot;attachment_id&quot;: attachment.id,
</span><del>-            &quot;queue_position&quot;: queue_position,
-            &quot;state&quot;: attachment.state_from_queue_status(queue_status) if queue_status else &quot;none&quot;,
-            &quot;status&quot;: queue_status,
</del><span class="cx">         }
</span><ins>+        # 10 recent statuses is enough to always include a resultative one, if there were any at all.
+        statuses = QueueStatus.all().filter('queue_name =', queue.name()).filter('active_patch_id =', attachment.id).order('-date').fetch(limit=10)
+        if not statuses:
+            if attachment.id in queue.active_work_items().item_ids:
+                bubble[&quot;state&quot;] = &quot;started&quot;
+                bubble[&quot;details_message&quot;] = &quot;Started processing, no output yet.\n\n&quot; + self._iso_time(queue.active_work_items().time_for_item(attachment.id))
+            else:
+                real_queue_position = self._real_queue_position(queue, queue_position)
+                bubble[&quot;state&quot;] = &quot;none&quot;
+                bubble[&quot;details_message&quot;] = &quot;Waiting in queue, processing has not started yet.\n\nPosition in queue: &quot; + str(real_queue_position)
+                bubble[&quot;queue_position&quot;] = real_queue_position
+        else:
+            latest_resultative_status = self._latest_resultative_status(statuses)
+            if not latest_resultative_status:
+                bubble[&quot;state&quot;] = &quot;started&quot;
+                bubble[&quot;details_message&quot;] = (&quot;Started processing.\n\nRecent messages:\n\n&quot;
+                    + &quot;\n&quot;.join([status.message for status in statuses]) + &quot;\n\n&quot; + self._iso_time(statuses[0].date))
+            elif statuses[0].message == &quot;Pass&quot;:
+                bubble[&quot;state&quot;] = &quot;pass&quot;
+                bubble[&quot;details_message&quot;] = &quot;Pass\n\n&quot; + self._iso_time(statuses[0].date)
+            elif statuses[0].message == &quot;Fail&quot;:
+                bubble[&quot;state&quot;] = &quot;fail&quot;
+                bubble[&quot;details_message&quot;] = statuses[1].message + &quot;\n\n&quot; + self._iso_time(statuses[0].date)
+            elif statuses[0].message == &quot;Error: &quot; + queue.name() + &quot; did not process patch.&quot;:
+                bubble[&quot;state&quot;] = &quot;none&quot;
+                bubble[&quot;details_message&quot;] = &quot;The patch is no longer eligible for processing.&quot;
+                if len(statuses) &gt; 1:
+                    bubble[&quot;details_message&quot;] += &quot; Recent messages:\n\n&quot; + &quot;\n&quot;.join([status.message for status in statuses[1:]]) + &quot;\n\n&quot; + self._iso_time(statuses[0].date)
+            elif statuses[0].message == &quot;Error: &quot; + queue.name() + &quot; unable to apply patch.&quot;:
+                bubble[&quot;state&quot;] = &quot;fail&quot;
+                bubble[&quot;details_message&quot;] = statuses[1].message + &quot;\n\n&quot; + self._iso_time(statuses[0].date)
+            elif statuses[0].message.startswith(&quot;Error: &quot;):
+                bubble[&quot;state&quot;] = &quot;error&quot;
+                bubble[&quot;details_message&quot;] = &quot;\n&quot;.join([status.message for status in statuses]) + &quot;\n\n&quot; + self._iso_time(statuses[0].date)
+            elif queue_position:
+                bubble[&quot;state&quot;] = &quot;provisional-fail&quot;
+                bubble[&quot;details_message&quot;] = self._build_message_for_provisional_failure(queue, attachment, queue_position, statuses)
+            else:
+                bubble[&quot;state&quot;] = &quot;error&quot;
+                bubble[&quot;details_message&quot;] = (&quot;Internal error. Latest status implies that the patch should be in queue, but it is not. Recent messages:\n\n&quot;
+                    + &quot;\n&quot;.join([status.message for status in statuses]) + &quot;\n\n&quot; + self._iso_time(statuses[0].date))
+
+        if &quot;details_message&quot; in bubble:
+            bubble[&quot;details_message&quot;] = queue.display_name() + &quot;\n\n&quot; + bubble[&quot;details_message&quot;]
+
</ins><span class="cx">         return bubble
</span><span class="cx"> 
</span><del>-    def _have_status_for(self, attachment, queue):
-        # Any pending queue is shown.
</del><ins>+    def _should_show_bubble_for(self, attachment, queue):
+         # Any pending queue is shown.
</ins><span class="cx">         if attachment.position_in_queue(queue):
</span><span class="cx">             return True
</span><del>-        # Complete ewses are also shown.
</del><ins>+        # EWS queues are also shown when complete.
</ins><span class="cx">         return bool(queue.is_ews() and attachment.status_for_queue(queue))
</span><span class="cx"> 
</span><span class="cx">     def _build_bubbles_for_attachment(self, attachment):
</span><span class="cx">         show_submit_to_ews = True
</span><span class="cx">         bubbles = []
</span><span class="cx">         for queue in Queue.all():
</span><del>-            if not self._have_status_for(attachment, queue):
</del><ins>+            if not self._should_show_bubble_for(attachment, queue):
</ins><span class="cx">                 continue
</span><span class="cx">             queue_position = attachment.position_in_queue(queue)
</span><del>-            if queue_position and queue_position &gt;= 100:
-                # This queue is so far behind it's not even worth showing.
-                continue
-            bubbles.append(self._build_bubble(queue, attachment, queue_position))
-            # If even one ews has status, we don't show the submit-to-ews button.
</del><ins>+            bubble = self._build_bubble(queue, attachment, queue_position)
+            if bubble:
+                bubbles.append(bubble)
+            # If at least one EWS queue has status, we don't show the submit-to-ews button.
</ins><span class="cx">             if queue.is_ews():
</span><span class="cx">                 show_submit_to_ews = False
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsQueueStatusServermodelattachmentpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/QueueStatusServer/model/attachment.py (174086 => 174087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/QueueStatusServer/model/attachment.py        2014-09-29 21:26:06 UTC (rev 174086)
+++ trunk/Tools/QueueStatusServer/model/attachment.py        2014-09-29 21:55:04 UTC (rev 174087)
</span><span class="lines">@@ -34,24 +34,6 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class Attachment(object):
</span><del>-    @classmethod
-    def recent(cls, limit=1):
-        statuses = QueueStatus.all().order(&quot;-date&quot;)
-        # Notice that we use both a set and a list here to keep the -date ordering.
-        ids = []
-        visited_ids = set()
-        for status in statuses:
-            attachment_id = status.active_patch_id
-            if not attachment_id:
-                continue
-            if attachment_id in visited_ids:
-                continue
-            visited_ids.add(attachment_id)
-            ids.append(attachment_id)
-            if len(visited_ids) &gt;= limit:
-                break
-        return map(cls, ids)
-
</del><span class="cx">     def __init__(self, attachment_id):
</span><span class="cx">         self.id = attachment_id
</span><span class="cx">         self._summary = None
</span><span class="lines">@@ -63,20 +45,6 @@
</span><span class="cx">         self._summary = self._fetch_summary()
</span><span class="cx">         return self._summary
</span><span class="cx"> 
</span><del>-    def state_from_queue_status(self, status):
-        table = {
-            &quot;Pass&quot; : &quot;pass&quot;,
-            &quot;Fail&quot; : &quot;fail&quot;,
-        }
-        state = table.get(status.message)
-        if state:
-            return state
-        if status.message.startswith(&quot;Error:&quot;):
-            return &quot;error&quot;
-        if status:
-            return &quot;pending&quot;
-        return None
-
</del><span class="cx">     def position_in_queue(self, queue):
</span><span class="cx">         return self._queue_positions().get(queue.name())
</span><span class="cx"> 
</span><span class="lines">@@ -117,7 +85,6 @@
</span><span class="cx">             if status:
</span><span class="cx">                 # summary() is a horrible API and should be killed.
</span><span class="cx">                 summary[queue.name_with_underscores()] = {
</span><del>-                    &quot;state&quot;: self.state_from_queue_status(status),
</del><span class="cx">                     &quot;status&quot;: status,
</span><span class="cx">                 }
</span><span class="cx">         return summary
</span></span></pre></div>
<a id="trunkToolsQueueStatusServertemplatesstatusbubblehtml"></a>
<div class="modfile"><h4>Modified: trunk/Tools/QueueStatusServer/templates/statusbubble.html (174086 => 174087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/QueueStatusServer/templates/statusbubble.html        2014-09-29 21:26:06 UTC (rev 174086)
+++ trunk/Tools/QueueStatusServer/templates/statusbubble.html        2014-09-29 21:55:04 UTC (rev 174087)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">     -moz-border-radius: 5px;
</span><span class="cx">     -webkit-border-radius: 5px;
</span><span class="cx">     border-radius: 5px;
</span><del>-    border: 1px solid #AAA;
</del><ins>+    border: 1px solid rgba(1, 1, 1, 0.3);
</ins><span class="cx">     background-color: white;
</span><span class="cx">     font-size: 11px;
</span><span class="cx">     cursor: pointer;
</span><span class="lines">@@ -27,29 +27,22 @@
</span><span class="cx">     color: black;
</span><span class="cx"> }
</span><span class="cx"> .status:hover {
</span><del>-    border-color: #666;
</del><ins>+    border-color: rgba(1, 1, 1, 0.7);
</ins><span class="cx"> }
</span><del>-.none {
-    cursor: auto;
-}
-.none:hover {
-    border-color: #AAA;
-}
</del><span class="cx"> .pass {
</span><span class="cx">     background-color: #8FDF5F;
</span><del>-    border: 1px solid #4F8530;
</del><span class="cx"> }
</span><span class="cx"> .fail {
</span><span class="cx">     background-color: #E98080;
</span><del>-    border: 1px solid #A77272;
</del><span class="cx"> }
</span><del>-.pending {
-    background-color: #FFFC6C;
-    border: 1px solid #C5C56D;
</del><ins>+.started {
+    background-color: #D8FFFA;
</ins><span class="cx"> }
</span><ins>+.provisional-fail {
+    background-color: #FFAF05;
+}
</ins><span class="cx"> .error {
</span><span class="cx">   background-color: #E0B0FF;
</span><del>-  border: 1px solid #ACA0B3;
</del><span class="cx"> }
</span><span class="cx"> .queue_position {
</span><span class="cx">     font-size: 9px;
</span><span class="lines">@@ -72,9 +65,9 @@
</span><span class="cx"> &lt;div id=&quot;bubbleContainer&quot;&gt;
</span><span class="cx">   {% for bubble in bubbles %}
</span><span class="cx">   &lt;a class=&quot;status {{ bubble.state }}&quot; target=&quot;_top&quot;
</span><del>-  {% if bubble.status %}
</del><span class="cx">       href=&quot;/patch/{{ bubble.attachment_id }}&quot;
</span><del>-      title=&quot;{{ bubble.status.date|timesince }} ago&quot;
</del><ins>+  {% if bubble.details_message %}
+      title=&quot;{{ bubble.details_message }}&quot;
</ins><span class="cx">   {% endif %}
</span><span class="cx">   &gt;
</span><span class="cx">     {{ bubble.name }}
</span><span class="lines">@@ -91,6 +84,20 @@
</span><span class="cx">     &lt;input class=&quot;status&quot; type=&quot;submit&quot; value=&quot;Submit for EWS analysis&quot;&gt;
</span><span class="cx">   &lt;/form&gt;
</span><span class="cx"> {% endif %}
</span><ins>+
+&lt;script&gt;
+// Convert from UTC dates to local.
+var bubbles = document.getElementsByClassName(&quot;status&quot;)
+for (var i = 0; i &lt; bubbles.length; ++i) {
+    var bubble = bubbles[i];
+    if (bubble.hasAttribute(&quot;title&quot;)) {
+        var newTitle = bubble.getAttribute(&quot;title&quot;).replace(/\[\[(.+)\]\]/, function(match, isoDateString) {
+            return new Date(isoDateString).toString();
+        });
+        bubble.setAttribute(&quot;title&quot;, newTitle);
+    }
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre>
</div>
</div>

</body>
</html>