/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
- <!--
- The MIT License
- Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
- Erik Ramfelt, Seiji Sogabe, Alan Harder
- 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.
- -->
- <!-- Displays the chart that show how long builds are taking -->
- <?jelly escape-by-default='true'?>
- <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="${%title(it.displayName)}">
- <st:include page="sidepanel.jelly" />
- <l:main-panel>
- <h1>${%Timeline}</h1>
- <st:include page="control.jelly" it="${it.timeline}" />
- <div style="height:2em"/><!-- spacer -->
- <h1>${%Build Time Trend}</h1>
- <j:choose>
- <j:when test="${it.builds.size()>1}">
- <div align="center">
- <img src="buildTimeGraph/png" width="500" height="400" lazymap="buildTimeGraph/map" alt="[Build time graph]" style="float:right"/>
- </div>
- <j:set var="isMasterSlaveEnabled" value="${!empty(app.slaves)}"/>
- <div align="center">
- <table class="sortable" style="margin-top:1em;">
- <tr>
- <th><st:nbsp/></th>
- <th initialSortDir="up">${%Build}</th>
- <th>${%Duration}</th>
- <j:if test="${isMasterSlaveEnabled}">
- <th>${%Slave}</th>
- </j:if>
- </tr>
- <j:forEach var="r" items="${it.builds}">
- <tr>
- <td>
- <img width="16" height="16" src="${imagesURL}/16x16/${r.buildStatusUrl}" alt="${r.iconColor.description}" />
- </td>
- <td data="${r.number}">
- <a href="${r.number}">
- ${r.displayName}
- </a>
- </td>
- <td data="${r.duration}">
- ${r.durationString}
- </td>
- <j:if test="${isMasterSlaveEnabled}">
- <td>
- <t:node value="${r.builtOn}"/>
- </td>
- </j:if>
- </tr>
- </j:forEach>
- </table>
- </div>
- </j:when>
- <j:otherwise>
- ${%More than 1 builds are needed for the trend report.}
- </j:otherwise>
- </j:choose>
- </l:main-panel>
- </l:layout>
- </j:jelly>