-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1443 from scherler/BEE-30772
- Loading branch information
Showing
14 changed files
with
449 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/main/resources/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud/new.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!-- | ||
The MIT License | ||
Copyright (c) 2023, CloudBees Inc. | ||
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:l="/lib/layout" xmlns:f="/lib/form"> | ||
<l:layout permission="${app.SYSTEM_READ}" title="${%New pod template}"> | ||
<j:set var="readOnlyMode" value="${!app.hasPermission(app.ADMINISTER)}"/> | ||
<l:breadcrumb title="${%New pod template }"/> | ||
<st:include page="sidepanel.jelly" it="${it}"/> | ||
<l:main-panel> | ||
<h1>${%New pod template settings}</h1> | ||
<f:form method="post" action="create" name="config" class="jenkins-form"> | ||
<!-- main body of the configuration --> | ||
|
||
<j:set var="descriptor" value="${it.templateDescriptor}"/> | ||
<st:include class="${descriptor.clazz}" page="config.jelly"/> | ||
<l:isAdmin> | ||
<f:bottomButtonBar> | ||
<f:submit value="${%Create}"/> | ||
</f:bottomButtonBar> | ||
</l:isAdmin> | ||
</f:form> | ||
<l:isAdmin> | ||
<st:adjunct includes="lib.form.confirm"/> | ||
</l:isAdmin> | ||
</l:main-panel> | ||
</l:layout> | ||
</j:jelly> |
36 changes: 36 additions & 0 deletions
36
src/main/resources/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud/sidepanel.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- | ||
The MIT License | ||
Copyright (c) 2023, CloudBees Inc. | ||
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:l="/lib/layout" xmlns:t="/lib/hudson"> | ||
<l:header /> | ||
<l:side-panel> | ||
<l:tasks> | ||
<l:task contextMenu="false" href="." icon="symbol-computer" title="${%Status}"/> | ||
<l:task href="templates" icon="symbol-details" title="${%Pod Templates}"/> | ||
<l:task href="configure" icon="symbol-settings" | ||
title="${app.hasPermission(app.ADMINISTER) ? '%Configure' : '%View Configuration'}"/> | ||
<l:delete permission="${app.ADMINISTER}" title="${%Delete Cloud}" message="${%delete.cloud(it.displayName)}"/> | ||
<t:actions /> | ||
</l:tasks> | ||
<j:forEach var="action" items="${it.allActions}"> | ||
<st:include it="${action}" page="box.jelly" optional="true"/> | ||
</j:forEach> | ||
</l:side-panel> | ||
</j:jelly> |
1 change: 1 addition & 0 deletions
1
...in/resources/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud/sidepanel.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
delete.cloud=Delete the cloud ''{0}'' ? |
83 changes: 83 additions & 0 deletions
83
src/main/resources/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud/templates.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<!-- | ||
The MIT License | ||
Copyright (c) 2023, CloudBees Inc. | ||
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"> | ||
<!-- with empty type attribute, takes full width space, works only because core doesn't provide a CSS "app-page-body-" --> | ||
<l:layout title="${it.name} - ${%Pod templates}" | ||
type="${request.hasParameter('expand') ? 'full-screen' : 'two-column'}"> | ||
<st:include page="sidepanel.jelly"/> | ||
|
||
<l:main-panel> | ||
<j:choose> | ||
<j:when test="${not empty it.templates}"> | ||
<l:app-bar title="${it.name} - ${%Pod templates}"> | ||
<l:isAdmin> | ||
<a name="newTemplate" class="jenkins-button jenkins-button--primary" href="new"> | ||
<l:icon src="symbol-add"/> | ||
${%Add a pod template} | ||
</a> | ||
</l:isAdmin> | ||
</l:app-bar> | ||
<table id="templates" class="jenkins-table sortable"> | ||
<thead> | ||
<tr> | ||
<th initialSortDir="down">${%Name}</th> | ||
<th class="jenkins-table__cell--tight"/> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<j:forEach var="template" items="${it.templates}"> | ||
<tr id="template_${template.id}"> | ||
<td> | ||
<a href="${it.getCloudUrl(request,app,cloud)}template/${template.id}" class="jenkins-table__button">${template.name}</a> | ||
</td> | ||
<td class="jenkins-table__cell--tight"> | ||
<div class="jenkins-table__cell__button-wrapper"> | ||
<a href="${it.getCloudUrl(request,app,cloud)}template/${template.id}" class="jenkins-table__button"> | ||
<l:icon src="symbol-settings"/> | ||
</a> | ||
</div> | ||
</td> | ||
</tr> | ||
</j:forEach> | ||
</tbody> | ||
</table> | ||
</j:when> | ||
<j:otherwise> | ||
<l:app-bar title="${it.name} - ${%Pod templates}"/> | ||
<div > | ||
<section> | ||
<div> | ||
<div class="jenkins-!-padding-bottom-3">No pod template added yet.</div> | ||
<div> | ||
<a name="newTemplate" class="jenkins-button jenkins-button--primary" href="new"> | ||
<l:icon src="symbol-add"/> | ||
${%Add a pod template} | ||
</a> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</j:otherwise> | ||
</j:choose> | ||
</l:main-panel> | ||
</l:layout> | ||
</j:jelly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.