WebKit Bugzilla
Attachment 361872 Details for
Bug 194571
: [ews-app] Add status bubble html template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
status-bubble-template.patch (text/plain), 6.94 KB, created by
Aakash Jain
on 2019-02-12 17:08:54 PST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2019-02-12 17:08:54 PST
Size:
6.94 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 241331) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2019-02-12 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-app] Add status bubble html template >+ https://bugs.webkit.org/show_bug.cgi?id=194571 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-app/ews/templates: Added. >+ * BuildSlaveSupport/ews-app/ews/templates/statusbubble.html: Copied from QueueStatusServer/templates/statusbubble.html. >+ > 2019-02-12 Jonathan Bedard <jbedard@apple.com> > > webkitpy: Remove bug_dummy from parsed test expectations >Index: Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html >=================================================================== >--- Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html (revision 241329) >+++ Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html (working copy) >@@ -69,7 +69,7 @@ window.addEventListener("message", funct > <div id="bubbleContainer"> > {% if show_failure_to_apply %} > <a class="status fail" target="_top" >- href="/patch/{{ attachment_id }}" >+ href="/patch/{{ patch_id }}" > title="None of the queues could apply the patch" > > > patch does not apply to trunk of repository >@@ -77,7 +77,7 @@ window.addEventListener("message", funct > {% else %} > {% for bubble in bubbles %} > <a class="status {{ bubble.state }}" target="_top" >- href="/patch/{{ bubble.attachment_id }}/{{ bubble.queue_name }}" >+ href="{{ bubble.url }}" > {% if bubble.details_message %} > title="{{ bubble.details_message }}" > {% endif %} >@@ -92,7 +92,7 @@ window.addEventListener("message", funct > > {% 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="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> >Index: Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html >=================================================================== >--- Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html (revision 241329) (from Tools/QueueStatusServer/templates/statusbubble.html:241329) >+++ Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html (working copy) >@@ -0,0 +1,116 @@ >+<!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> >Index: Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html >=================================================================== >--- Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html (revision 241329) >+++ Tools/BuildSlaveSupport/ews-app/ews/templates/statusbubble.html (working copy) >@@ -69,7 +69,7 @@ window.addEventListener("message", funct > <div id="bubbleContainer"> > {% if show_failure_to_apply %} > <a class="status fail" target="_top" >- href="/patch/{{ attachment_id }}" >+ href="/patch/{{ patch_id }}" > title="None of the queues could apply the patch" > > > patch does not apply to trunk of repository >@@ -77,7 +77,7 @@ window.addEventListener("message", funct > {% else %} > {% for bubble in bubbles %} > <a class="status {{ bubble.state }}" target="_top" >- href="/patch/{{ bubble.attachment_id }}/{{ bubble.queue_name }}" >+ href="{{ bubble.url }}" > {% if bubble.details_message %} > title="{{ bubble.details_message }}" > {% endif %} >@@ -92,7 +92,7 @@ window.addEventListener("message", funct > > {% 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="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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
lforschler
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194571
: 361872