PageRenderTime 40ms CodeModel.GetById 34ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/hudson-core/src/main/resources/hudson/model/Job/buildTimeTrend.jelly

http://github.com/hudson/hudson
Unknown | 83 lines | 76 code | 7 blank | 0 comment | 0 complexity | 0efde04c1cb43fbe4bc02e14bc95bef9 MD5 | raw file
 1<!--
 2The MIT License
 3
 4Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
 5Erik Ramfelt, Seiji Sogabe, Alan Harder
 6
 7Permission is hereby granted, free of charge, to any person obtaining a copy
 8of this software and associated documentation files (the "Software"), to deal
 9in the Software without restriction, including without limitation the rights
10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11copies of the Software, and to permit persons to whom the Software is
12furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in
15all copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23THE SOFTWARE.
24-->
25
26<!-- Displays the chart that show how long builds are taking -->
27<?jelly escape-by-default='true'?>
28<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">
29  <l:layout title="${%title(it.displayName)}">
30		<st:include page="sidepanel.jelly" />
31		<l:main-panel>
32      <h1>${%Timeline}</h1>
33      <st:include page="control.jelly" it="${it.timeline}" />
34      <div style="height:2em"/><!-- spacer -->
35
36      <h1>${%Build Time Trend}</h1>
37      <j:choose>
38        <j:when test="${it.builds.size()&gt;1}">
39          <div align="center">
40            <img src="buildTimeGraph/png" width="500" height="400" lazymap="buildTimeGraph/map" alt="[Build time graph]" style="float:right"/>
41          </div>
42
43          <j:set var="isMasterSlaveEnabled" value="${!empty(app.slaves)}"/>
44          <div align="center">
45            <table class="sortable" style="margin-top:1em;">
46              <tr>
47                <th><st:nbsp/></th>
48                <th initialSortDir="up">${%Build}</th>
49                <th>${%Duration}</th>
50                <j:if test="${isMasterSlaveEnabled}">
51                  <th>${%Slave}</th>
52                </j:if>
53              </tr>
54              <j:forEach var="r" items="${it.builds}">
55                <tr>
56                  <td>
57                  	<img width="16" height="16" src="${imagesURL}/16x16/${r.buildStatusUrl}" alt="${r.iconColor.description}" />
58                  </td>
59                  <td data="${r.number}">
60                    <a href="${r.number}">
61                    ${r.displayName}
62                    </a>
63                  </td>
64                  <td data="${r.duration}">
65                    ${r.durationString}
66                  </td>
67                  <j:if test="${isMasterSlaveEnabled}">
68                    <td>
69                      <t:node value="${r.builtOn}"/>
70                    </td>
71                  </j:if>
72                </tr>
73              </j:forEach>
74            </table>
75          </div>
76        </j:when>
77        <j:otherwise>
78          ${%More than 1 builds are needed for the trend report.}
79        </j:otherwise>
80      </j:choose>
81    </l:main-panel>
82	</l:layout>
83</j:jelly>