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