-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Add experimental Manage Jenkins layout #11222
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
Changes from 55 commits
db697ec
c09f227
370220d
3f7c0f2
f840a00
526a265
a5668c0
2599618
c6a4928
2e09190
4386589
ee7a0d6
032421a
9036b62
2c8d440
dfaab77
cdb2171
d08a3ac
e99c553
c26408f
ce732f3
4046867
1ebbc55
caadf7f
16fec47
4405c28
9a13f53
3c12f08
6affa42
15c3e83
95feadb
3068db1
a95e9b5
5a667bb
5fd67a6
8d54020
7caac7c
e6dfbfc
0d936fd
03d9948
46368a5
0c99d1e
c2f5670
b2d1a2f
ea7667d
7eb82d0
03aa268
33f55a0
b1889be
b8bf879
b9c06a1
c33da8f
ee59723
119f957
38de90c
366b31b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| * The MIT License | ||
| * | ||
| * Copyright (c) 2025, Jan Faracik | ||
| * | ||
| * 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 jenkins.model.experimentalflags; | ||
|
|
||
| import edu.umd.cs.findbugs.annotations.Nullable; | ||
| import hudson.Extension; | ||
| import org.kohsuke.accmod.Restricted; | ||
| import org.kohsuke.accmod.restrictions.NoExternalUse; | ||
|
|
||
| @Extension | ||
| @Restricted(NoExternalUse.class) | ||
| public class NewManageJenkinsUserExperimentalFlag extends BooleanUserExperimentalFlag { | ||
| public NewManageJenkinsUserExperimentalFlag() { | ||
| super("new-manage-jenkins.flag"); | ||
| } | ||
|
|
||
| @Override | ||
| public String getDisplayName() { | ||
| return "New Manage Jenkins UI"; | ||
| } | ||
|
|
||
| @Nullable | ||
| @Override | ||
| public String getShortDescription() { | ||
| return "Enables a sidebar for the Manage Jenkins pages for easier navigation."; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,18 +25,9 @@ THE SOFTWARE. | |
| <!-- About Jenkins page --> | ||
| <?jelly escape-by-default='true'?> | ||
| <j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"> | ||
| <l:layout type="one-column" permissions="${app.MANAGE_AND_SYSTEM_READ}" title="${%about(app.VERSION)}"> | ||
| <l:header> | ||
| <script src="${resURL}/jsbundles/section-to-tabs.js" type="text/javascript" defer="true" /> | ||
| </l:header> | ||
|
|
||
| <l:main-panel> | ||
| <div class="app-about-branding"> | ||
| <div class="app-about-branding__aurora"></div> | ||
| <img src="${imagesURL}/svgs/logo.svg" alt="${%logo}" /> | ||
| </div> | ||
|
|
||
| <div class="jenkins-app-bar"> | ||
| <j:set var="header"> | ||
| <l:view> | ||
| <div class="jenkins-app-bar jenkins-!-margin-top-2 jenkins-!-margin-bottom-4"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not using
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't have a slot for the version number. |
||
| <div class="jenkins-app-bar__content"> | ||
| <h1 class="app-about-heading">Jenkins</h1> | ||
| <p class="app-about-version"> | ||
|
|
@@ -50,93 +41,104 @@ THE SOFTWARE. | |
| </a> | ||
| </div> | ||
| </div> | ||
| </l:view> | ||
| </j:set> | ||
|
|
||
| <p class="app-about-paragraph">${%blurb}</p> | ||
| <l:settings-subpage header="${header}" | ||
| placeholder="${null}" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. passing a null placeholder seems wrong why is this needed?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Otherwise a default app bar appears whilst its loading, its a little jarring seeing it switch to a completely different one. |
||
| permissions="${app.MANAGE_AND_SYSTEM_READ}"> | ||
| <script src="${resURL}/jsbundles/section-to-tabs.js" type="text/javascript" defer="true" /> | ||
|
|
||
| <div class="jenkins-tab-pane"> | ||
| <h2 class="jenkins-tab-pane__title">${%maven.dependencies}</h2> | ||
| <j:set var="uri" value="${it.licensesURL}"/> | ||
| <j:choose> | ||
| <j:when test="${uri != null}"> | ||
| <t:thirdPartyLicenses> | ||
| <j:include uri="${uri}"/> | ||
| </t:thirdPartyLicenses> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <p>${%No information recorded}</p> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </div> | ||
| <div class="app-about-branding"> | ||
| <div class="app-about-branding__aurora"></div> | ||
| <img src="${imagesURL}/svgs/logo.svg" alt="${%logo}" /> | ||
| </div> | ||
|
|
||
| <div class="jenkins-tab-pane"> | ||
| <h2 class="jenkins-tab-pane__title">${%static.dependencies}</h2> | ||
| <table class="jenkins-table sortable"> | ||
| <thead> | ||
| <tr> | ||
| <th>${%Name}</th> | ||
| <th>${%Author}</th> | ||
| <th>${%Licence}</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <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> | ||
| <p class="jenkins-page-description jenkins-!-text-color">${%blurb}</p> | ||
|
|
||
| <div class="jenkins-tab-pane"> | ||
| <h2 class="jenkins-tab-pane__title">${%maven.dependencies}</h2> | ||
| <j:set var="uri" value="${it.licensesURL}"/> | ||
| <j:choose> | ||
| <j:when test="${uri != null}"> | ||
| <t:thirdPartyLicenses> | ||
| <j:include uri="${uri}"/> | ||
| </t:thirdPartyLicenses> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <p>${%No information recorded}</p> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </div> | ||
|
|
||
| <div class="jenkins-tab-pane"> | ||
| <h2 class="jenkins-tab-pane__title">${%static.dependencies}</h2> | ||
| <table class="jenkins-table sortable"> | ||
| <thead> | ||
| <tr> | ||
| <th>${%Name}</th> | ||
| <th>${%Author}</th> | ||
| <th>${%Licence}</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <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> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
|
|
||
| <div class="jenkins-tab-pane"> | ||
| <h2 class="jenkins-tab-pane__title">${%plugin.dependencies}</h2> | ||
| <table class="jenkins-table sortable"> | ||
| <thead> | ||
| <tr> | ||
| <th>${%Name}</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <j:forEach var="p" items="${app.pluginManager.plugins}"> | ||
| <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 class="jenkins-table__link" href="${rootURL}/plugin/${p.shortName}/wrapper/thirdPartyLicenses"> | ||
| <j:choose> | ||
| <j:when test="${p.active}"> | ||
| ${p.displayName} | ||
| </j:when> | ||
| <j:otherwise> | ||
| <strike>${p.displayName}</strike> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
|
|
||
| <div class="jenkins-tab-pane"> | ||
| <h2 class="jenkins-tab-pane__title">${%plugin.dependencies}</h2> | ||
| <table class="jenkins-table sortable"> | ||
| <thead> | ||
| <tr> | ||
| <th>${%Name}</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <j:forEach var="p" items="${app.pluginManager.plugins}"> | ||
| <tr> | ||
| <td> | ||
| <a class="jenkins-table__link" href="${rootURL}/plugin/${p.shortName}/wrapper/thirdPartyLicenses"> | ||
| <j:choose> | ||
| <j:when test="${p.active}"> | ||
| ${p.displayName} | ||
| </j:when> | ||
| <j:otherwise> | ||
| <strike>${p.displayName}</strike> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| </j:forEach> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </l:main-panel> | ||
| </l:layout> | ||
| </j:forEach> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </l:settings-subpage> | ||
| </j:jelly> | ||
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.
Do we know why
manage.jellyisn't justindex.jelly? Seems 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.
I agree - happy to experiment with renaming it to
index.jellyin a follow up.manage.jellywas added in 07f0405#diff-83d7a9405bfbe87e69167b2e0bc36db7070c3de282390b72f90eac9db2adc0f8R19-R238 not clear why they didn't just useindex.