Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e57af77c69ff00e623a1c02a94506643969bb8e7 (plain) (blame)
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
<!-- **************************************************************************
#
# Copyright  (c) 2004-2009 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors: 
#
#    Kohsuke Kawaguchi, Tom Huybrechts, Yahoo! Inc.
#        
#
#************************************************************************** --> 


<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
  <st:documentation>
    Displays the build queue as &lt;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:documentation>
  <t:setIconSize/>
  <l:pane title="${%Build Queue}" width="2" id="buildQueue">
    <j:if test="${app.quietingDown}">
      <tr>
        <td class="pane" colspan="2" style="white-space: normal;">
          ${%Hudson is going to shut down. No further builds will be performed.}
          <j:if test="${h.hasPermission(app.ADMINISTER)}">
            <a href="${rootURL}/cancelQuietDown">(${%cancel})</a>
          </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" width="100%" tooltip="${item.why}${h.escape(item.params)}" style="white-space: normal;">
              <j:set var="stuck" value="${item.isStuck()}"/>
              <j:choose>
                <j:when test="${h.hasPermission(item.task,item.task.READ)}">
                  <a href="${rootURL}/${item.task.url}">
                    ${item.task.fullDisplayName}
                  </a>
                  <j:if test="${stuck}">
                    &#160;
                    <a href="http://wiki.hudson-ci.org/display/HUDSON/Executor+Starvation">
                      <img src="${imagesURL}/16x16/hourglass.gif"  />
                    </a>
                  </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()}">
                <a href="${rootURL}/queue/item/${item.id}/cancelQueue"><img src="${imagesURL}/16x16/stop.gif" alt="cancel this build" /></a>
              </j:if>
             </td>
          </tr>
        </j:forEach>
        <tr>
          <td class="pane" style="text-align: right" colspan="2">
            <j:if test="${h.hasPermission(app.ADMINISTER)}">
              <a href="${rootURL}/queue/clearQueue">
                 (${%cancel all})
              </a>
            </j:if>
          </td>
        </tr>
      </j:otherwise>
    </j:choose>
  </l:pane>
  <!-- schedule updates only for the full page reload -->
  <j:if test="${ajax==null and !h.isAutoRefresh(request) and h.hasPermission(app.READ)}">
    <script defer="defer">
      refreshPart('buildQueue',"${h.hasView(it,'ajaxBuildQueue')?'.':rootURL}/ajaxBuildQueue");
    </script>
  </j:if>
</j:jelly>

Back to the top