PageRenderTime 11ms CodeModel.GetById 3ms app.highlight 1ms RepoModel.GetById 6ms app.codeStats 0ms

/hudson-core/src/main/resources/hudson/model/LoadStatistics/main.jelly

http://github.com/hudson/hudson
Unknown | 66 lines | 61 code | 5 blank | 0 comment | 0 complexity | 6174f9e4961286243d91c2f029ea13e0 MD5 | raw file
 1<!--
 2The MIT License
 3
 4Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe
 5
 6Permission is hereby granted, free of charge, to any person obtaining a copy
 7of this software and associated documentation files (the "Software"), to deal
 8in the Software without restriction, including without limitation the rights
 9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22THE SOFTWARE.
23-->
24
25<!-- renders an HTML fragment that shows trend graph -->
26<?jelly escape-by-default='true'?>
27<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">
28  <h1>
29    <img src="${imagesURL}/48x48/monitor.gif" alt=""/>
30    ${%title(it.displayName)}
31  </h1>
32  <j:set var="type" value="${request.getParameter('type') ?: 'min'}" />
33  <div>
34    ${%Timespan}:
35    <j:choose>
36      <j:when test="${type != 'sec10'}">
37        <a href="?type=sec10">${%Short}</a>
38      </j:when>
39      <j:otherwise>
40        ${%Short}
41      </j:otherwise>
42    </j:choose>
43    <st:nbsp />
44    <j:choose>
45      <j:when test="${type != 'min'}">
46        <a href="?type=min">${%Medium}</a>
47      </j:when>
48      <j:otherwise>
49        ${%Medium}
50      </j:otherwise>
51    </j:choose>
52    <st:nbsp />
53    <j:choose>
54      <j:when test="${type != 'hour'}">
55        <a href="?type=hour">${%Long}</a>
56      </j:when>
57      <j:otherwise>
58        ${%Long}
59      </j:otherwise>
60    </j:choose>
61  </div>  
62  <img src="${prefix?:'loadStatistics'}/graph?type=${type}&amp;width=500&amp;height=300" alt="[${%Load statistics graph}]" />
63  <div style="margin-top: 2em;">
64    ${%blurb}
65  </div>
66</j:jelly>