-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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-73805] #9788
Closed
Closed
[JENKINS-73805] #9788
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d9657b3
[JENKINS-73805] add start decorator
scherler 5438945
Merge remote-tracking branch 'upstream/master' into JENKINS-73805
scherler f95aa75
[JENKINS-73805] implement split
scherler 9ea6d1d
Merge branch 'master' into JENKINS-73805
scherler 567d2a1
[JENKINS-73805] refactor to stapplerOverride
scherler a3e3a63
[JENKINS-73805] clear up
scherler c472d07
[JENKINS-73805] fix spotless
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2018, 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. | ||
*/ | ||
|
||
package hudson; | ||
|
||
import java.util.List; | ||
|
||
import hudson.model.Describable; | ||
import hudson.model.Descriptor; | ||
import jenkins.model.Jenkins; | ||
|
||
/** | ||
* Participates in the rendering of the about page | ||
* | ||
* <p> | ||
* This class provides a few hooks to augment the HTML of the about page. | ||
* | ||
* <dl> | ||
* <dt>about-branding.jelly</dt> | ||
* <dd> | ||
* This view contributes to the branding section. | ||
* </dd> | ||
* <dt>about-involved.jelly</dt> | ||
* <dd> | ||
* This view contributes the get involved box/icon. | ||
* </dd> | ||
* <dt>about-static.jelly</dt> | ||
* <dd> | ||
* This view contributes to the static listing of dependencies. | ||
* </dd> | ||
* </dl> | ||
* | ||
* @since 2.478 | ||
*/ | ||
public class AboutPageDecorator extends Descriptor<AboutPageDecorator> implements ExtensionPoint, Describable<AboutPageDecorator> { | ||
|
||
protected AboutPageDecorator() { | ||
super(self()); | ||
} | ||
|
||
@Override | ||
public final Descriptor<AboutPageDecorator> getDescriptor() { | ||
return this; | ||
} | ||
/** | ||
* Obtains the URL of this object, excluding the context path. | ||
* | ||
* <p> | ||
* Every {@link AboutPageDecorator} is bound to URL via {@link Jenkins#getDescriptor()}. | ||
* This method returns such an URL. | ||
*/ | ||
|
||
public final String getUrl() { | ||
return "descriptor/" + clazz.getName(); | ||
} | ||
|
||
/** | ||
* Returns all about page decorators. | ||
*/ | ||
public static List<AboutPageDecorator> all() { | ||
return Jenkins.get().getDescriptorList(AboutPageDecorator.class); | ||
} | ||
|
||
/** | ||
* The first found AboutDecorator, there can only be one. | ||
* @return the first found {@link AboutPageDecorator} | ||
*/ | ||
public static AboutPageDecorator first() { | ||
List<AboutPageDecorator> decorators = all(); | ||
return decorators.isEmpty() ? null : decorators.get(0); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
core/src/main/resources/hudson/AboutJenkins/about-branding.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,30 @@ | ||
<!-- | ||
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"> | ||
<div class="app-about-branding"> | ||
<div class="app-about-branding__aurora"></div> | ||
<img src="${imagesURL}/svgs/logo.svg" alt="${%logo}" /> | ||
</div> | ||
</j:jelly> |
32 changes: 32 additions & 0 deletions
32
core/src/main/resources/hudson/AboutJenkins/about-involved.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,32 @@ | ||
<!-- | ||
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:l="/lib/layout"> | ||
<div class="jenkins-app-bar__controls"> | ||
<a href="https://www.jenkins.io/participate/" class="jenkins-button" target="_blank"> | ||
<l:icon src="symbol-heart" /> | ||
${%Get involved} | ||
</a> | ||
</div> | ||
</j:jelly> |
52 changes: 52 additions & 0 deletions
52
core/src/main/resources/hudson/AboutJenkins/about-static.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,52 @@ | ||
<!-- | ||
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:l="/lib/layout"> | ||
<tr> | ||
<td> | ||
<a class="jenkins-table__link" href="https://github.com/jenkins-contrib-themes/jenkins-core-theme"> | ||
Jenkins Contrib Themes | ||
</a> | ||
</td> | ||
<td> | ||
<a class="jenkins-table__link" href="https://github.com/afonsof">Afonso Franca</a> | ||
</td> | ||
<td> | ||
<a class="jenkins-table__link" href="https://opensource.org/licenses/MIT">MIT License</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<a class="jenkins-table__link" href="https://ionic.io/ionicons">Ionicons</a> | ||
</td> | ||
<td> | ||
<a class="jenkins-table__link" href="https://github.com/ionic-team">Ionic</a> | ||
</td> | ||
<td> | ||
<a class="jenkins-table__link" href="https://github.com/ionic-team/ionicons/blob/master/LICENSE">MIT | ||
License | ||
</a> | ||
</td> | ||
</tr> | ||
</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
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
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.
Why
Descriptor
/Describable
? Seems entirely unnecessary.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.
For lack of knowledge, I used #8462 for inspiration I will look into
StaplerOverridable
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.
@daniel-beck I have refactored the code, does that look better?