-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathindex.jelly
More file actions
105 lines (101 loc) · 5.33 KB
/
index.jelly
File metadata and controls
105 lines (101 loc) · 5.33 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
<?xml version="1.0" encoding="UTF-8" ?>
<!-- The MIT License Copyright (c) 2010, Dominik Bartholdi 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:t="/lib/hudson" xmlns:f="/lib/form">
${it.checkAtLeastOneScriptlerPermission()}
<l:layout title="${%title}" norefresh="true">
<st:once>
<link rel="stylesheet" href="${resURL}/plugin/scriptler/scriptler.css" />
</st:once>
<st:include page="sidepanel.jelly" />
<l:main-panel>
<h1>${%title}</h1>
${%intro}
<h4 style="margin-top: 1rem; margin-bottom: 0">
${%scriptdirectorytext}
</h4>
${it.scriptDirectory}
<br /><br />
<div class="excerpt">
<j:if test="${it.configuration.scripts.size() == 0}">
<h3>
${%noScriptsAvailable}
</h3>
</j:if>
<table class="jenkins-table scriptler-list-table">
<tbody>
<j:set var="items" value="${it.configuration.sortedScripts}" />
<j:forEach var="i" items="${items}">
<j:set var="approved" value="${i.approved}" />
<j:set var="t" value="${i.script}" />
<tr>
<td class="scriptler-toolbar">
<j:choose>
<j:when test="${approved == null}">
<l:icon tooltip="${%fileNotAvailable}" src="symbol-remove-circle plugin-ionicons-api" class="icon-sm jenkins-!-error-color" />
</j:when>
<j:when test="${approved == true}">
<l:icon tooltip="${%scriptApproved}" src="symbol-checkmark-circle plugin-ionicons-api" class="icon-sm jenkins-!-success-color" />
</j:when>
<j:otherwise>
<l:icon tooltip="${%scriptNotYetApproved}" src="symbol-warning plugin-ionicons-api" class="icon-sm jenkins-!-warning-color"/>
</j:otherwise>
</j:choose>
<span class="scriptler-icon-slot">
<j:choose>
<j:when test="${t.nonAdministerUsing}">
<l:icon tooltip="${%usableInBuildStep}" src="symbol-construct-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</j:when>
<j:otherwise>
<l:icon tooltip="${%notUsableInBuildStep}" src="symbol-lock-closed-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</j:otherwise>
</j:choose>
</span>
<l:hasPermission permission="${it.scriptlerRunScripts}">
<a href="runScript?id=${t.id}" class="scriptler-icon-slot">
<l:icon tooltip="${%runScript} ${t.name}" src="symbol-terminal-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</a>
</l:hasPermission>
<l:hasPermission permission="${it.scriptlerConfigure}">
<a href="editScript?id=${t.id}" class="scriptler-link-button scriptler-icon-slot">
<l:icon tooltip="${%editScript} ${t.name}" src="symbol-create-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</a>
<st:adjunct includes="org.jenkinsci.plugins.scriptler.ScriptlerManagement.confirm-remove" />
<form method="post" action="removeScript" class="scriptler-inline scriptler-icon-slot scriptler-remove-script-form" data-name="${t.name}">
<input type="hidden" name="id" value="${t.id}" />
<button type="submit" name="submit_param" value="submit_value" class="scriptler-link-button">
<l:icon tooltip="${%removeScript} ${t.name}" src="symbol-trash-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</button>
</form>
</l:hasPermission>
</td>
<td>
<div class="scriptler-script-name">${t.name}</div>
<div class="scriptler-script-comment">
<j:out value="${it.markupFormatter.translate(empty(t.comment) ? '-' : t.comment)}" />
</div>
</td>
<td class="scriptler-origin-cell">
<j:if test="${!empty(t.originScript)}">
Origin info:
<a target="_blank" href="${it.getCatalogInfoByName(t.originCatalog).getReplacedDetailUrl(t.id, t.originScript)}">
${t.originScript}
</a>
, import date:
${t.originDate}
</j:if>
</td>
</tr>
</j:forEach>
</tbody>
</table>
</div>
</l:main-panel>
</l:layout>
</j:jelly>