forked from jenkinsci/configuration-as-code-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jelly
More file actions
58 lines (52 loc) · 2.1 KB
/
index.jelly
File metadata and controls
58 lines (52 loc) · 2.1 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
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:st="jelly:stapler">
<l:layout type="one-column" title="${%Configuration as Code}" permissions="${app.MANAGE_AND_SYSTEM_READ}">
<l:main-panel>
<l:app-bar title="${%Configuration as Code}">
<f:form method="post" action="reload" name="reload">
<l:hasAdministerOrManage>
<f:submit icon="symbol-refresh" primary="false" name="reload"
value="${%Reload existing configuration}"/>
</l:hasAdministerOrManage>
</f:form>
<f:form method="post" action="viewExport" name="viewExport">
<l:hasPermission permission="${app.SYSTEM_READ}">
<f:submit primary="false" name="viewExport" value="${%Export configuration}"/>
</l:hasPermission>
</f:form>
</l:app-bar>
<j:choose>
<j:when test="${empty it.sources}">
<p>${%Controller has no configuration as code file set.}</p>
</j:when>
<j:otherwise>
${%Configuration loaded from :}
<ul>
<j:forEach var="source" items="${it.sources}">
<li>${source}</li>
</j:forEach>
</ul>
<p>${%Last time applied:} <i:formatDate value="${it.lastTimeLoaded}" type="both" dateStyle="medium" timeStyle="long"/></p>
</j:otherwise>
</j:choose>
<l:isAdmin>
<f:form method="post" action="replace" name="replace">
<h2>${%Replace configuration source with:}</h2>
<f:entry title="${%Path or URL}" field="newSource" class="jenkins-form-item--small" >
<f:textbox checkUrl="checkNewSource" checkDependsOn="newSource"/>
</f:entry>
<f:block>
<f:submit name="replace" value="${%Apply new configuration}"/>
</f:block>
</f:form>
</l:isAdmin>
<l:hasPermission permission="${app.SYSTEM_READ}">
<h2>${%Reference}</h2>
<dt>
<dl><a href="reference">${%Documentation}</a></dl>
<dl><a href="schema">${%JSON schema}</a></dl>
</dt>
</l:hasPermission>
</l:main-panel>
</l:layout>
</j:jelly>