-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Expand file tree
/
Copy pathqueue.jelly
More file actions
116 lines (111 loc) · 5.05 KB
/
queue.jelly
File metadata and controls
116 lines (111 loc) · 5.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Tom Huybrechts, Yahoo! Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<st:documentation> <![CDATA[
Displays the build queue as <l:pane>
]]>
<st:attribute name="items" use="required">
Queue items to be displayed. Normally you should specify ${app.queue.items},
but for example you can specify a sublist after some filtering to narrow down
the list.
</st:attribute>
<st:attribute name="filtered" use="optional">
Indicates that the queue has been filtered, i.e. might not show all items.
</st:attribute>
</st:documentation>
<t:setIconSize/>
<j:choose>
<j:when test="${filtered}">
<j:set var="title" value="${%Filtered Build Queue(items.size())}" />
</j:when>
<j:otherwise>
<j:set var="title" value="${%Build Queue(items.size())}" />
</j:otherwise>
</j:choose>
<l:pane title="${title}" width="2" id="buildQueue">
<st:adjunct includes="lib.form.link.link"/>
<j:if test="${app.quietingDown}">
<tr>
<td class="pane" colspan="2" style="white-space: normal;">
${%Jenkins is going to shut down. No further builds will be performed.}
<j:if test="${h.hasPermission(app.MANAGE)}">
<f:link href="${rootURL}/cancelQuietDown" post="true">(${%cancel})</f:link>
</j:if>
</td>
</tr>
</j:if>
<j:choose>
<j:when test="${empty(items)}">
<j:if test="${! app.quietingDown}">
<tr>
<td class="pane" colspan="2">
${%No builds in the queue.}
</td>
</tr>
</j:if>
</j:when>
<j:otherwise>
<j:forEach var="item" items="${items}">
<tr>
<td class="pane pane-grow" style="white-space: normal;">
<j:set var="stuck" value="${item.isStuck()}"/>
<j:choose>
<j:when test="${h.hasPermission(item.task,item.task.READ)}">
<j:set var="causeDescription">
<j:forEach var="entry" items="${item.causeCounts.entrySet()}">${entry.key.shortDescription}<j:if test="${entry.value > 1}"><st:nbsp/>${%Ntimes(entry.value)}</j:if><br/>
</j:forEach>${item.why} ${item.params}
${%WaitingFor(item.inQueueForString)}
</j:set>
<a href="${rootURL}/${item.task.url}" class="model-link inside tl-tr"
data-html-tooltip="${causeDescription}"
data-tooltip-append-to-parent="true">
<l:breakable value="${item.displayName}"/>
</a>
<!-- TODO include estimated number as in BuildHistoryWidget/entries.jelly if possible -->
<j:if test="${stuck}">
<td class="pane" width="16" align="center" valign="middle">
<a href="https://www.jenkins.io/redirect/troubleshooting/executor-starvation">
<l:icon src="symbol-hourglass" class="icon-sm"/>
</a>
</td>
</j:if>
</j:when>
<j:otherwise>
<span>${%Unknown Task}</span>
</j:otherwise>
</j:choose>
</td>
<td class="pane" width="16" align="center" valign="middle">
<j:if test="${item.hasCancelPermission()}">
<l:stopButton href="${rootURL}/queue/cancelItem?id=${item.id}" confirm="${%confirm(item.displayName)}" alt="${%Cancel this build}"/>
</j:if>
</td>
</tr>
</j:forEach>
</j:otherwise>
</j:choose>
</l:pane>
<!-- schedule updates only for the full page reload -->
<j:if test="${ajax==null and h.hasPermission(app.READ)}">
<div class="widget-refresh-reference" data-id="buildQueue" data-url="${rootURL}/${it.url}ajax"/>
<st:adjunct includes="lib.hudson.widget-refresh"/>
</j:if>
</j:jelly>