index.jelly 4.5 KB
Newer Older
K
kohsuke 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<!--
The MIT License

Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, Stephen Connolly, Tom Huybrechts

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.
-->

25
<?jelly escape-by-default='true'?>
K
kohsuke 已提交
26 27 28 29
<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" xmlns:i="jelly:fmt">
  <l:layout title="${it.displayName}">
    <st:include page="sidepanel.jelly" />
    <l:main-panel>
30

K
kohsuke 已提交
31 32
      <!-- temporarily offline switch -->
      <div style="float:right">
33 34
        <j:choose>
          <j:when test="${it.temporarilyOffline}">
35 36 37 38
            <l:hasPermission permission="${it.CONNECT}">
              <form method="post" action="toggleOffline">
                <f:submit value="${%submit.temporarilyOffline}"  />
              </form>
39 40 41
              <form method="post" action="setOfflineCause">
              <f:submit value="${%submit.updateOfflineCause}"  />
              </form>
42
            </l:hasPermission>
43 44
          </j:when>
          <j:otherwise>
45 46 47 48 49
            <l:hasPermission permission="${it.DISCONNECT}">
              <form method="post" action="markOffline">
                <f:submit value="${%submit.not.temporarilyOffline}"  />
              </form>
            </l:hasPermission>
50 51
          </j:otherwise>
        </j:choose>
K
kohsuke 已提交
52 53 54
      </div>

      <h1>
55
        <img src="${imagesURL}/48x48/${it.icon}" width="48" height="48" alt=""/>
K
kohsuke 已提交
56 57
        ${it.caption}
        <j:if test="${!empty(it.node.nodeDescription)}">
K
bug fix  
Kohsuke Kawaguchi 已提交
58
          <span style="font-size:smaller">(${it.node.nodeDescription})</span>
K
kohsuke 已提交
59
        </j:if>
K
kohsuke 已提交
60
      </h1>
K
kohsuke 已提交
61

62
      <j:if test="${it.offlineCause!=null and it.offline and !it.connecting}">
63 64 65
        <st:include it="${it.offlineCause}" page="cause.jelly" />
      </j:if>

66 67 68 69
      <j:if test="${it.manualLaunchAllowed}">
        <st:include from="${it.launcher}" page="main.jelly" optional="true"/>
      </j:if>

70
      <j:if test="${it.offline and !it.manualLaunchAllowed and it.launchSupported}">
71 72 73
        <p>${%title.no_manual_launch(it.retentionStrategy.descriptor.displayName)}</p>
      </j:if>

74 75 76 77
     <!-- Display user which created this node -->
     <j:set var="user" value="${app.getUser(it.node.userId)}"/>
     <j:if test="${it.node.userId !=null and user!=null}">
       <p>
S
Seiji Sogabe 已提交
78
          ${%Created by} 
79 80
         <j:choose>
            <j:when test="${it.node.userId.equals('anonymous')}">
81
             ${%anonymous user}
82 83 84 85 86 87 88
            </j:when>
           <j:otherwise>
             <a href="${app.rootUrl}${user.url}">${user.displayName}</a>
            </j:otherwise>
         </j:choose>
       </p>
      </j:if>
K
kohsuke 已提交
89

90
        <j:if test="${it.node.assignedLabels.size() gt 1}">
91
        <div>
92
          <h2>${%Labels}</h2>
93 94 95
          <j:forEach var="entry" items="${it.node.labelCloud}">
            <!-- Skip the label for this node -->
            <j:if test="${entry.item!=it.node.selfLabel}">
96
              <a class="${entry.className} model-link inside" href="${rootURL}/label/${entry.item.name}">${entry.item.name}</a>
97 98 99 100 101
            </j:if>
          </j:forEach>
        </div>
      </j:if>

M
mdillon 已提交
102
      <st:include page="nodepropertysummaries.jelly" />
103

S
sogabe 已提交
104
      <h2>${%title.projects_tied_on(it.displayName)}</h2>
K
kohsuke 已提交
105 106 107 108
      <j:set var="jobs" value="${it.tiedJobs}" />
      <j:choose>
        <j:when test="${empty(jobs)}">
          <p>
S
sogabe 已提交
109
            ${%None}
K
kohsuke 已提交
110 111 112
          </p>
        </j:when>
        <j:otherwise>
113
          <t:projectView jobs="${jobs}"/>
K
kohsuke 已提交
114 115 116
        </j:otherwise>
      </j:choose>

117
      <st:include page="main.jelly" optional="true"/>
K
kohsuke 已提交
118 119
    </l:main-panel>
  </l:layout>
120
</j:jelly>