-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-72176] Split cloud management page into multiple pages #1443
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
f9571b2
[broken] wip
scherler be4fca7
[BEE-30772] working listing page
scherler 2e89c57
[BEE-30772] WIP
scherler b7bdefe
[BEE-30772] Working edit of template, missing new
scherler cee3420
[BEE-30772] remove unused imports
scherler b183580
[BEE-30772] remove unused code
scherler 558cb42
[BEE-30772] remove unused code
scherler 0661f6d
[BEE-30772] remove unused code
scherler f1d29e6
[BEE-30772] remove unused code
scherler 5848de2
[BEE-30772] remove unused code
scherler 93b833d
Merge branch 'master' into BEE-30772
scherler 227712c
[BEE-30772] try the action
scherler aefb1d9
[BEE-30772] implement new template
scherler 20c0acf
[BEE-30772] working delete basically
scherler 2dbd016
[BEE-30772] refactor so all stays in one class
scherler d921fc9
[BEE-30772] fix different issues
scherler 189c5ac
[BEE-30772] wrap up
scherler a011a9d
[BEE-30772] fix test as pointed out by james
scherler d31ac1f
[BEE-30772] fix delete and add security check
scherler 30753a8
Update src/main/java/org/csanchez/jenkins/plugins/kubernetes/Kubernet…
scherler c86ad89
[BEE-30772] fix idiom of code
scherler 49c0ac3
Merge branch 'BEE-30772' of github.com:scherler/kubernetes-plugin int…
scherler 75b7c78
[BEE-30772] remove custom icon
scherler c1342c6
[BEE-30772] fix different issues
scherler bee1a7f
[BEE-30772] fix test
scherler 3c2a4a3
[BEE-30772] better code thanks to vincent
scherler 4442a4a
[BEE-30772] fix test
scherler a6295db
Update pom.xml
scherler 7b875ed
[BEE-30772] remove obsolete code
scherler af6373b
Merge branch 'BEE-30772' of github.com:scherler/kubernetes-plugin int…
scherler a5699ee
[BEE-30772] remove obsolete code
scherler bcafb81
[BEE-30772] add more tests a
scherler b1edb7f
Apply suggestions from code review
scherler 3be2fde
[BEE-30772] fix merge and apply suggestions
scherler 31be218
[BEE-30772] revert test
scherler 0e3cbb0
Update src/main/resources/org/csanchez/jenkins/plugins/kubernetes/Kub…
scherler 0986f8e
[BEE-30772] fix jenkins bug in renaming cloud and redirect
scherler dd65959
[BEE-30772] add fixme note
scherler 2a9048c
Merge branch 'master' into BEE-30772
scherler ea4047a
Apply suggestions from code review
scherler d03c902
Merge branch 'master' into BEE-30772
scherler c7180ab
[BEE-30772] remove fix for core
scherler 758d8c8
Merge branch 'master' into BEE-30772
scherler 2775886
Apply suggestions from code review
scherler 08866ec
[BEE-30772] removed unused
scherler 697f605
Apply suggestions from code review
scherler 18c219c
[BEE-30772] add name of the pod to confirmation
scherler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine this bump is there to retrieve some necessary updates from core?
Cause it is higher than the recommended minimum version: https://www.jenkins.io/doc/developer/tutorial-improve/update-base-jenkins-version/
And also it does not align with the bom anymore (bom is using
2.401.x
).If it is intended and mandatory to have
2.415
it could be interesting to write a comment explaining it and a TODO to align the bom as soon as available?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afair this is to get
<l:delete ...>
.BOM should be bumped to the closest LTS which is
2.414.x
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change was suggested by @Vlatombe, we need a version after jenkinsci/jenkins#7658, other than that ...