Skip to content
Permalink
Browse files

[FIX JENKINS-30565] Ask for confirmation before canceling/aborting (#…

  • Loading branch information
daniel-beck committed Aug 31, 2016
1 parent 55e23a3 commit 3af3a27116ccec048ce9eb61f947d74e0fe37611
@@ -0,0 +1 @@
confirm=Are you sure you want to cancel the queued run of {0}?
@@ -61,8 +61,8 @@ THE SOFTWARE.
<j:if test="${build.building}">
<div class="build-stop">
<!-- Check ABORT permission for Project, Admin permission otherwise -->
<j:if test="${empty(it.widget.owner.ABORT) ? h.hasPermission(app.ADMINISTER) : it.widget.owner.hasPermission(it.widget.owner.ABORT)}">
<l:stopButton href="${link}stop" alt="[cancel]"/>
<j:if test="${empty(it.widget.owner.ABORT) ? h.hasPermission(app.ADMINISTER) : it.widget.owner.hasPermission(it.widget.owner.ABORT)}">
<l:stopButton href="${link}stop" alt="[cancel]" confirm="${%confirm(build.fullDisplayName)}" />
</j:if>
</div>
</j:if>
@@ -0,0 +1 @@
confirm=Are you sure you want to abort {0}?
@@ -37,7 +37,7 @@ THE SOFTWARE.
<t:buildProgressBar build="${it}"/>
</td><td>
<j:if test="${it.parent.hasAbortPermission()}">
<l:stopButton href="stop" alt="[${%cancel}]"/>
<l:stopButton href="stop" confirm="${%confirm(it.fullDisplayName)}" alt="[${%cancel}]"/>
</j:if>
</td>
</tr></table>
@@ -0,0 +1 @@
confirm=Are you sure you want to abort {0}?
@@ -110,7 +110,7 @@ THE SOFTWARE.
</st:include>
<td class="pane" align="center" valign="middle">
<j:if test="${e.hasStopPermission()}">
<l:stopButton href="${rootURL}/${c.url}${url}/stop" alt="${%terminate this build}"/>
<l:stopButton href="${rootURL}/${c.url}${url}/stop" confirm="${%confirm(exe.fullDisplayName)}" alt="${%terminate this build}" />
</j:if>
</td>
</j:otherwise>
@@ -1 +1,2 @@
Computers=master{0,choice,0#|1# + {0,number} computer ({1} of {2} executors)|1< + {0,number} computers ({1} of {2} executors)}
Computers=master{0,choice,0#|1# + {0,number} computer ({1} of {2} executors)|1< + {0,number} computers ({1} of {2} executors)}
confirm=Are you sure you want to abort {0}?
@@ -91,7 +91,7 @@ THE SOFTWARE.
</td>
<td class="pane" width="16" align="center" valign="middle">
<j:if test="${item.hasCancelPermission()}">
<l:stopButton href="${rootURL}/queue/cancelItem?id=${item.id}" alt="cancel this build"/>
<l:stopButton href="${rootURL}/queue/cancelItem?id=${item.id}" confirm="${%confirm(item.task.fullDisplayName)}" alt="cancel this build"/>
</j:if>
</td>
</tr>
@@ -1,3 +1,4 @@
Build\ Queue=Build Queue{0,choice,0#|0< ({0,number})}
Filtered\ Build\ Queue=Filtered Build Queue{0,choice,0#|0< ({0,number})}
WaitingFor=Waiting for {0}
WaitingFor=Waiting for {0}
confirm=Are you sure you want to cancel the queued run of {0}?
@@ -33,8 +33,20 @@ THE SOFTWARE.
<st:attribute name="alt" use="required">
Alt text for image.
</st:attribute>
<st:attribute name="confirm" use="optional">
If defined, the user will be asked for confirmation first, and the value will be used as question.
</st:attribute>
</st:documentation>
<a class="stop-button-link" href="${href}" onclick="new Ajax.Request(this.href); return false">
<l:icon class="icon-stop icon-sm"/>
</a>
<j:choose>
<j:when test="${confirm == null}">
<a class="stop-button-link" href="${href}" onclick='new Ajax.Request("${href}"); return false;'>
<l:icon class="icon-stop icon-sm"/>
</a>
</j:when>
<j:otherwise>
<a class="stop-button-link" href="${href}" onclick='if(confirm("${confirm}"))new Ajax.Request("${href}"); return false;'>
<l:icon class="icon-stop icon-sm"/>
</a>
</j:otherwise>
</j:choose>
</j:jelly>

0 comments on commit 3af3a27

Please sign in to comment.
You can’t perform that action at this time.