forked from jenkinsci/jenkins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.jelly
More file actions
223 lines (200 loc) · 9.92 KB
/
layout.jelly
File metadata and controls
223 lines (200 loc) · 9.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!--
The MIT License
Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
Daniel Dyer, Seiji Sogabe, Tom Huybrechts, Manufacture Francaise des Pneumatiques
Michelin, Romain Seguy
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.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:i="jelly:fmt"
xmlns:x="jelly:xml" xmlns:dd="/lib/layout/dropdowns">
<st:documentation> <![CDATA[
Outer-most tag for a normal (non-AJAX) HTML rendering.
This is used with nested <header>, <side-panel>, and <main-panel>
to form Jenkins's basic HTML layout.
]]>
<st:attribute name="title" use="required"> <![CDATA[
Title of the HTML page. Rendered into <title> tag.
]]>
</st:attribute>
<st:attribute name="norefresh">
Deprecated: Used to disable auto refresh for a page. The feature has been removed.
</st:attribute>
<st:attribute name="css" deprecated="true"> <![CDATA[
specify path that starts from "/" for loading additional CSS stylesheet.
path is interpreted as relative to the context root. e.g.,
{noformat}<l:layout css="/plugin/mysuperplugin/css/myneatstyle.css">{noformat}
This was originally added to allow plugins to load their stylesheets, but
*the use of the attribute is discouraged now.*
plugins should now do so by inserting <style> elements and/or <script> elements
in <l:header/> tag.
]]>
</st:attribute>
<st:attribute name="permission">
If given, this page is only made available to users who have the specified permission.
(The permission will be checked against the "it" object.)
</st:attribute>
<st:attribute name="permissions">
If given, this page is made available to users who have one or more of the specified permissions.
(The permissions will be checked against the "it" object.)
</st:attribute>
<st:attribute name="type" use="optional">
Available values: two-column (by default), one-column (full-width size) or full-screen (since 2.53).
</st:attribute>
<st:attribute name="nogrid" use="optional">
Do not include Bootstrap 3 grid. When a plugin wants to use a more recent version of Bootstrap then
the bundled grid will cause conflicts.
</st:attribute>
</st:documentation>
<l:view contentType="text/html;charset=UTF-8">
<st:setHeader name="Expires" value="0" />
<st:setHeader name="Cache-Control" value="no-cache,no-store,must-revalidate" />
<st:setHeader name="X-Hudson-Theme" value="default" />
<st:setHeader name="Referrer-Policy" value="same-origin" />
<st:setHeader name="Cross-Origin-Opener-Policy" value="same-origin" />
<!--
depending on what tags are used, we can later end up discovering that we needed a session,
but it's too late because the headers are already committed. so ensure we always have a session.
this also allows us to configure HttpSessionContextIntegrationFilter not to create sessions,
which I suspect can end up creating sessions for wrong resource types (such as static resources.)
-->
<j:if test="${h.isUserTimeZoneOverride()}">
<i:setTimeZone value="${h.getUserTimeZone()}" />
</j:if>
<j:if test="${attrs.type==null}">
<j:set var="layoutType" value="two-column"/>
</j:if>
<j:if test="${attrs.type!=null}">
<j:set var="layoutType" value="${attrs.type}"/>
</j:if>
<j:set var="_" value="${request2.getSession()}"/>
<j:set var="extensionsAvailable" value="${h.extensionsAvailable}"/>
<j:if test="${request2.servletPath=='/' || request2.servletPath==''}">
${h.advertiseHeaders(response2)}
<j:if test="${extensionsAvailable}">
<j:forEach var="pd" items="${h.pageDecorators}">
<st:include it="${pd}" page="httpHeaders.jelly" optional="true"/>
</j:forEach>
</j:if>
</j:if>
<x:doctype name="html" />
<html>
<head data-rooturl="${rootURL}" data-resurl="${resURL}" data-imagesurl="${imagesURL}" resURL="${resURL}"
data-extensions-available="${extensionsAvailable}"
data-crumb-header="${h.getCrumbRequestField()}" data-crumb-value="${h.getCrumb(request2)}"
data-unit-test="${h.isUnitTest}">
${h.checkPermission(it,permission)}
${h.checkAnyPermission(it, permissions)}
<title>${h.appendIfNotNull(title, ' - Jenkins', 'Jenkins')}</title>
<link rel="stylesheet" href="${resURL}/jsbundles/styles.css" type="text/css" />
<j:if test="${attrs.nogrid==null or attrs.nogrid.equals(false)}">
<link rel="stylesheet" href="${resURL}/css/responsive-grid.css" type="text/css" />
</j:if>
<j:if test="${attrs.css!=null}">
<link rel="stylesheet" href="${resURL}${attrs.css}" type="text/css" />
</j:if>
<link rel="icon" href="${resURL}/favicon.svg" type="image/svg+xml" />
<link rel="alternate icon" href="${resURL}/favicon.ico" sizes="any" />
<link rel="apple-touch-icon" href="${resURL}/apple-touch-icon.png" sizes="180x180" />
<link rel="mask-icon" href="${resURL}/mask-icon.svg" color="#191717" />
<script src="${resURL}/scripts/behavior.js" type="text/javascript"/>
<st:adjunct includes="org.kohsuke.stapler.bind"/>
<script src="${resURL}/scripts/hudson-behavior.js" type="text/javascript"></script>
<script src="${resURL}/scripts/sortable.js" type="text/javascript"/>
<l:hasPermission permission="${app.READ}">
<link rel="search" type="application/opensearchdescription+xml" href="${rootURL}/opensearch.xml" title="Jenkins" />
</l:hasPermission>
<meta name="ROBOTS" content="INDEX,NOFOLLOW" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<j:set var="breadcrumbs">
<j:set var="mode" value="breadcrumbs" />
<d:invokeBody />
</j:set>
<j:set var="mode" value="header" />
<d:invokeBody />
<j:if test="${extensionsAvailable}">
<j:forEach var="pd" items="${h.pageDecorators}">
<st:include it="${pd}" page="header.jelly" optional="true" />
</j:forEach>
</j:if>
<!-- The vendors bundle is generated by webpack. It contains vendor scripts common to all JS modules -->
<script src="${resURL}/jsbundles/vendors.js" type="text/javascript"/>
<!-- Sortable library used in drag & drop -->
<script src="${resURL}/jsbundles/sortable-drag-drop.js" type="text/javascript"/>
<script src="${resURL}/jsbundles/app.js" type="text/javascript" defer="true" />
</head>
<body id="jenkins" class="${layoutType} jenkins-${h.version} ${app.isQuietingDown() ? 'jenkins-app-bar--sticky' : ''}" data-version="${h.version}" data-model-type="${it.class.name}"
data-search-url="${rootURL + '/search/suggest'}"
data-search-help-url="${%searchBox.url}">
<l:command-palette />
<j:if test="${layoutType!='full-screen'}">
<!-- for accessibility, skip the entire navigation bar and etc and go straight to the head of the content -->
<a href="#skip2content" class="jenkins-skip-link">Skip to content</a>
<l:pageHeader title="${%title}"
logoAlt="${%jenkinshead.alt}"
searchPlaceholder="${%search}"
searchHelpUrl="${%searchBox.url}"
logout="${%logout}"/>
</j:if>
<div id="page-body" class="app-page-body app-page-body--${layoutType} clear">
<j:if test="${layoutType=='two-column'}">
<j:set var="mode" value="side-panel" />
<d:invokeBody />
</j:if>
<div id="main-panel">
<j:set var="mode" value="main-panel" />
<d:invokeBody/>
</div>
</div>
<j:if test="${layoutType!='full-screen'}">
<footer class="page-footer jenkins-mobile-hide">
<div class="page-footer__flex-row">
<div class="page-footer__footer-id-placeholder" id="footer"></div>
<j:if test="${extensionsAvailable}">
<j:forEach var="pd" items="${h.pageDecorators}">
<st:include it="${pd}" page="footer.jelly" optional="true" />
</j:forEach>
</j:if>
<div class="page-footer__links">
<j:if test="${!empty(it.api)}">
<a class="jenkins-button jenkins-button--tertiary rest-api" href="api/">REST API</a>
</j:if>
<l:overflowButton text="Jenkins ${h.version}"
clazz="jenkins-button--tertiary jenkins_ver"
icon="${null}"
tooltip="${null}">
<l:hasPermission permission="${app.SYSTEM_READ}">
<dd:item icon="symbol-jenkins"
text="${%About Jenkins}"
href="${rootURL}/manage/about" />
<dd:separator />
</l:hasPermission>
<dd:item icon="symbol-heart"
text="${%Get involved}"
href="https://www.jenkins.io/participate/" />
<dd:item icon="symbol-external"
text="${%Website}"
href="${h.getFooterURL()}" />
</l:overflowButton>
</div>
</div>
</footer>
</j:if>
</body>
</html>
</l:view>
</j:jelly>