From c42ab43c4995a904bdf302933c9d92a90bb17e41 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Fri, 18 Apr 2025 05:24:10 +0100 Subject: [PATCH] Redesign the Jenkins header (#10245) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * WB * Push * More responsive * Update headerContent.jelly * Push * Update logo.jelly * Update _page-header.scss * Update _page-header.scss * Update header * Tidy up breadcrumbs * Tidy up focus * Update _breadcrumbs.scss * Update configure.jelly * push * Add badges * Tidy * Push * Update headerContent.jelly * Update ManageJenkinsAction.java * Update headerContent.jelly * Working! * WB * Tidy up * Fixes * Update sidepanel.jelly * Lint * Tidy up * Update ManageJenkinsAction.java * Simplify * Update _side-panel-tasks.scss * Update _side-panel-tasks.scss * Update UserAction.java * Update Jenkins.java * Add border to account image * Tidy up avatars * Update _side-panel-tasks.scss * Init * Tidy up * Hide behind flag * Update sidepanel.jelly * Push * Tidy up * Update logo.jelly * Accessibility * Update _breadcrumbs-new.scss * Fix dropdown theme * Update _breadcrumbs.scss * Update _header.scss * Update ManageJenkinsAction.java * Remove flag * Tidy up * Update with HeaderAction * Revert "Update with HeaderAction" This reverts commit 2ea0b1f867c3f3ae446c81ae780a8eb8a28c3d88. * Tidy * Update RootAction.java * Update _breadcrumbs.scss * Push * Update _header.scss * Update _header.scss * Fix invisible actions not actually being invisible, make avatar huge to please Tim * Tidy * Push * Fix breadcrumbs + notification * Update jumplist.jelly * Getting there 🚀 * WB * Update index.jelly * Update headerContent.jelly * Responsive * Push * Push * Push * Update index.js * Push * Tidy up * Tidy up * Tidy * Update logo.jelly * Delete NewHeaderUserExperimentalFlag.java * Lint * Update index.js * Update index.js * Fix some tests * Update headerContent.jelly * Update headerContent.jelly * Remove bravo test - need to confirm this * Update Security3349Test.java * Update pom.xml * Fix SpotBugs + i18n * Add doc for header scroll, support prefers contrast * Add overflow menu for actions, improve accessibility * Update actions-overflow.js * Fix tests + accessibility * Fix JS * Update breadcrumbs-overflow.js * Update breadcrumbs-overflow.js * Add breadcrumb menu on hover, fix issues on mobile * Update _breadcrumbs.scss * i18n * Update pom.xml * Add tab support for user dropdown * Squashed commit of the following: commit 847981ebcb6ae6aaac5463602cb185e2ade40200 Merge: 0ea6dcff0e 23f2b9ef59 Author: Kris Stern Date: Wed Feb 26 09:16:52 2025 +0800 Merge branch 'master' into add-groups-to-command-palette commit 0ea6dcff0e791c2e63d3da5b942e0524e1dc9620 Merge: c0777dbe79 68425e2cd4 Author: Kris Stern Date: Wed Feb 26 01:06:33 2025 +0800 Merge branch 'master' into add-groups-to-command-palette commit c0777dbe79b022dda8eb6f4fff117cf39064ee2b Merge: 1638afe17e c37293c52d Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Feb 24 13:40:35 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit 1638afe17eaabc2d0cfe2a1b9240cd40df8ce4d6 Merge: c987a9e536 b97764d3fd Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Fri Feb 21 11:49:03 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit c987a9e536a56c5815d868def8c5c6a3dbf1f2d6 Merge: f909eec0d4 16748f4413 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Thu Feb 20 08:17:19 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit f909eec0d49fb71e81ceeecf5a81f4d5159a16d3 Merge: 85eedb7e88 217b0f5742 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Feb 19 16:12:45 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit 85eedb7e88c38f0ae872f2f0a0c154162cf5c455 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Feb 19 16:11:24 2025 +0000 Move to Item commit 8f4f117bac52988dc2a3e11602159304bb43fd2c Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Feb 19 15:43:50 2025 +0000 Tighten up animations + improve contrast commit d7b7d6388deb477ba0cfb07588cff9f87e144c1d Merge: 8750f7cb92 4fa61274f9 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Feb 19 08:50:45 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit 8750f7cb922e97fdb621fec6bff376786863db14 Merge: 7b527340a2 a05c33f797 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Feb 18 21:42:31 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit 7b527340a27e81af95343e70fce8ad1a610f0850 Merge: e2c133d128 3505fb3540 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Feb 17 20:59:02 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit e2c133d1283e7e444fd49e21a26753f2085e925c Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sun Feb 16 18:23:14 2025 +0000 Update require-changelog-label.yml commit d32a61c1eabdb66b0d8d5e3300c714de484c8989 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sun Feb 16 17:11:18 2025 +0000 Update _theme.scss commit 42ecfcac5c555800d3b24fe6af6705e62073ddec Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sun Feb 16 17:10:48 2025 +0000 Rename to Items commit cc3779171a89988d2755092cd6b490be9b3a9b86 Merge: 0f1cb2187c 2b9d4d62a6 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sun Feb 16 17:10:25 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit 0f1cb2187c66967a209e7cca34a6faf2775e6690 Merge: 04dc6cd222 9474c89bf1 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Feb 12 20:42:01 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit 04dc6cd2225f4635a5f91c648d9e3dbbb0a7350d Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Feb 11 17:06:31 2025 +0000 Reduce spacing a touch, fix icon spacing commit 0ab3665587aec8a2c6d458bc394594299fecbbf2 Merge: 7c9e172b2f 848ac9b66a Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Feb 11 14:44:03 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit 7c9e172b2f427ffd9b1a85594615261bea327477 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Feb 11 11:23:27 2025 +0000 Update Messages.properties commit ec6a5e5ee01879fe817a6827ed42e238f6d46217 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Feb 11 08:51:16 2025 +0000 Fix test commit 14a64885a2284883d86f2af8f7ce4745d34511db Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Feb 10 16:44:39 2025 +0000 Tidy up commit 46a9e5681a98d86914123c50cec31ea6d3d01d0c Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Feb 10 16:28:15 2025 +0000 Tidy commit d7270b1fa49b27c2005e86807400f033969d7a41 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Feb 10 16:06:04 2025 +0000 Tidy commit b2da3f8d39c2c606c293919562528732390f386c Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Feb 10 16:03:37 2025 +0000 Tidy up commit b746fba008faf4784747c7494a4995628c02726e Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Feb 10 15:53:53 2025 +0000 Move to extensionpoint commit 7827304ae14cafbfc1f1500dea16881d6e4dec6a Merge: cac127d119 d03a2e11c9 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Feb 10 15:45:28 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit cac127d1196eeda50d15457384bf57009e7a0f41 Merge: add75bf6a9 e3e3c45270 Author: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Mon Jan 13 11:03:10 2025 +0000 Merge branch 'jenkinsci:master' into add-groups-to-command-palette commit add75bf6a9605ab61bf66b9e5e736803cb836d93 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat Jan 11 19:02:52 2025 +0000 Update _command-palette.scss commit eb4073f4fb74217d6aaf1ad960151e10318b67f0 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat Jan 11 18:59:37 2025 +0000 Tidy up commit 323e48fddfa079550c040066272a50efdcc0ede6 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat Jan 11 18:47:34 2025 +0000 Update Job.java commit 3cbdfbc4b5d3981c7c69c3c742127d11972e13c0 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat Jan 11 18:47:13 2025 +0000 Update _command-palette.scss commit 8fecf0d88053b43953d25d0430e2662b8e4ec02e Merge: 428e826fcd 331c7685ca Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat Jan 11 18:45:30 2025 +0000 Merge branch 'master' into add-groups-to-command-palette commit 428e826fcd1597f216b8534414aba45556e3ac03 Merge: 5657369d95 f1b6d31272 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon Dec 16 20:53:15 2024 +0000 Merge branch 'master' into add-groups-to-command-palette commit 5657369d9556231595c20aa2c7c8e9b3d0ae0f7c Merge: 26f17a277f 674d5085c3 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Fri Dec 13 09:46:35 2024 +0000 Merge branch 'add-icons-to-command-palette' into add-groups-to-command-palette commit 674d5085c333e3f580279ae0dbb8ce032b45c1b9 Merge: 809d2e6120 7020e80af8 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Fri Dec 13 09:42:59 2024 +0000 Merge branch 'master' into add-icons-to-command-palette commit 26f17a277f39cb27528bd647db266174a95b356e Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 22:10:56 2024 +0000 Update _command-palette.scss commit 2b6ffc85f33c17a095dffc770b5c383293d5d261 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 22:09:09 2024 +0000 Init commit 809d2e6120b36093c60ab88e2794d14fb3aaa5ea Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 21:37:47 2024 +0000 Make iconXml private, rename to icon commit 3d45ca7c3926586e17f8aed1f31f556109e63ea2 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 21:29:27 2024 +0000 Add group field commit 80f24cbfdcbadd52801c987e75cffec761df8fc6 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 21:25:23 2024 +0000 Init commit 1b9faa8fb0c129a1543b97aae2de55f676f2cecc Merge: d6868c970a 26738449cd Author: Tim Jacomb Date: Wed Dec 11 21:11:56 2024 +0000 Merge branch 'add-icons-to-command-palette' of github.com:janfaracik/jenkins into add-icons-to-command-palette commit d6868c970a06a17633cf7d145beef28598730a0b Author: Tim Jacomb Date: Wed Dec 11 21:11:41 2024 +0000 Reword javadoc commit 26738449cd62ea3c007503c0bebff4872b1fc14b Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 21:03:29 2024 +0000 Implement IconSpec in IComputer commit 57910109f32aa4cb2cf81188c12534f676e5a4ac Merge: 661f994783 05ed7560fd Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 20:23:58 2024 +0000 Merge branch 'master' into add-icons-to-command-palette commit 661f994783b96c867b2b0a618e66c603d5384b40 Merge: 23570203ea dad5ef3266 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 20:15:22 2024 +0000 Merge branch 'refine-command-palette' into add-icons-to-command-palette commit 23570203ea4eace9656825f7fb2e7233cdd59592 Merge: 436a02b9d3 788ae63c50 Author: Tim Jacomb Date: Wed Dec 11 16:35:43 2024 +0000 Merge branch 'add-icons-to-command-palette' of github.com:janfaracik/jenkins into add-icons-to-command-palette commit 436a02b9d307183e6cdedca66ec565f639896474 Author: Tim Jacomb Date: Wed Dec 11 16:35:24 2024 +0000 Add support for images commit a3fdb3e0c7df55fdf2876dc71ad0e3cda13289c5 Merge: ea67d6a554 d22cc2fa3c Author: Tim Jacomb Date: Wed Dec 11 15:27:12 2024 +0000 Merge branch 'master' into add-icons-to-command-palette commit 788ae63c5077057f5c53cf29cb61e2bbda5facb5 Merge: ea67d6a554 d22cc2fa3c Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed Dec 11 10:00:04 2024 +0000 Merge branch 'jenkinsci:master' into add-icons-to-command-palette commit dad5ef3266cf3a188a78f42c36eaa4c381e5bbf4 Merge: cc63c9c8e5 d22cc2fa3c Author: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Wed Dec 11 09:07:05 2024 +0000 Merge branch 'master' into refine-command-palette commit ea67d6a554417f3a976918b242b78ee3a816b2a9 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Dec 10 22:26:16 2024 +0000 Update Search.java commit a9aadbab3068e2f456866523f94ff88fa9052184 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Dec 10 22:25:40 2024 +0000 Revert "Update Search.java" This reverts commit 24837ea667183f189ee0ab73e86cb8cda58c8fe2. commit 24837ea667183f189ee0ab73e86cb8cda58c8fe2 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Dec 10 21:59:03 2024 +0000 Update Search.java commit d43a8d3b2f4121e234ef16a7b4723e271cd9c43e Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Dec 10 21:54:23 2024 +0000 Init commit cc63c9c8e50a27b78874ac67f48584e232c4e1b5 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue Dec 10 21:37:09 2024 +0000 Refine command palette * Move logo * Revert "Move logo" This reverts commit 25647d6a040fee15378ed4821cfde2cff29a015a. * Move actions to taglib * Split logo from breadcrumbs * Fix sticky app bar * Update _page-header.scss * Update HudsonTest.java * Update _page-header.scss * Move breadcrumb loading above setting mode to header * Reduce header height * Increase logo height * Move getActions to Header * Update header avatar with jenkins-avatar * Squashed commit of the following: commit 5060044fcd4a0edf7083906a542f7ed5d4066fc3 Merge: 0ea3e49fa1 2fb523ffe3 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat Mar 22 17:56:53 2025 +0000 Merge branch 'master' into improve-tooltips-dropdowns commit 0ea3e49fa11dfe53d21fbef283d3125dcc6f521c Merge: 3dd0b9f421 a1f9d3e7e2 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat Mar 22 12:24:49 2025 +0000 Merge branch 'master' into improve-tooltips-dropdowns commit 3dd0b9f421b8921a4c5624af8596d6c2f6434441 Merge: 7f5f814aa5 73185b257d Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Fri Mar 21 09:57:52 2025 +0000 Merge branch 'master' into improve-tooltips-dropdowns commit 7f5f814aa543ca93e49cc95bd7c0281d844714c5 Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Thu Mar 20 10:26:32 2025 +0000 Update _dropdowns.scss commit e9eee3c0a4548de82832c8ea45c72db4eab4418e Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Thu Mar 20 10:25:35 2025 +0000 Update _theme.scss commit ce11fd1fb33492fdb8ced65c8ce74821eb8f5e6f Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Thu Mar 20 10:22:07 2025 +0000 Init * Delete idea files * Update core/src/main/java/jenkins/views/Header.java Co-authored-by: Markus Winter * Sort actions manually in header * Update markup and CSS * Handle that dodgy SVG messing up the label * Fix new computer missing sidepanel * Update core/src/main/resources/lib/layout/header/actions.jelly Co-authored-by: Markus Winter * Update core/src/main/java/jenkins/views/Header.java Co-authored-by: Markus Winter * Update core/src/main/resources/lib/layout/header/actions.jelly Co-authored-by: Markus Winter * Update Header.java --------- Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> Co-authored-by: Kris Stern Co-authored-by: Markus Winter --- .../hudson/model/ManageJenkinsAction.java | 33 ++- .../java/hudson/model/MyViewsProperty.java | 2 +- .../main/java/hudson/model/RootAction.java | 12 + .../AdministrativeMonitorsDecorator.java | 9 - core/src/main/java/jenkins/model/Jenkins.java | 2 +- .../model/navigation/SearchAction.java | 36 ++- .../jenkins/model/navigation/UserAction.java | 96 ++++++++ core/src/main/java/jenkins/views/Header.java | 33 +++ .../java/jenkins/views/PartialHeader.java | 2 +- .../model/ManageJenkinsAction/index.jelly | 109 +++++---- .../hudson/model/Messages.properties | 2 + .../hudson/model/View/sidepanel.jelly | 1 - .../loginLink.jelly | 3 - .../security/SecurityRealm/loginLink.jelly | 10 +- .../SecurityRealm/loginLink.properties | 2 + .../footer.jelly | 71 ------ .../footer.properties | 2 - .../footer_bg.properties | 27 --- .../footer_de.properties | 24 -- .../footer_fr.properties | 2 - .../footer_it.properties | 25 --- .../footer_pl.properties | 24 -- .../footer_pt_BR.properties | 24 -- .../footer_sv_SE.properties | 2 - .../footer_tr.properties | 25 --- .../footer_zh_TW.properties | 2 - .../resources.css | 184 --------------- .../resources.js | 128 ----------- .../jenkins/model/Jenkins/configure.jelly | 2 +- .../navigation/SearchAction/tooltip.jelly | 9 + .../navigation/UserAction/jumplist.jelly | 25 +++ .../views/JenkinsHeader/headerContent.jelly | 24 +- .../jenkins/views/JenkinsHeader/logo.jelly | 7 + .../resources/lib/layout/breadcrumb.jelly | 6 +- .../resources/lib/layout/breadcrumbBar.jelly | 26 +-- .../resources/lib/layout/header/actions.jelly | 70 ++++++ .../resources/lib/layout/header/login.jelly | 39 +--- .../main/resources/lib/layout/layout.jelly | 13 +- .../resources/lib/layout/pageHeader.jelly | 1 + src/main/js/api/search.js | 3 +- .../js/components/command-palette/index.js | 4 +- src/main/js/components/dropdowns/jumplists.js | 37 +++ .../components/dropdowns/overflow-button.js | 20 +- src/main/js/components/dropdowns/templates.js | 21 ++ src/main/js/components/dropdowns/utils.js | 63 +++--- .../js/components/header/actions-overflow.js | 133 +++++++++++ .../components/header/breadcrumbs-overflow.js | 96 ++++++++ src/main/js/components/header/index.js | 66 ++++++ src/main/js/components/tooltips/index.js | 17 ++ src/main/js/keyboard-shortcuts.js | 2 +- src/main/scss/abstracts/_theme.scss | 17 +- src/main/scss/base/_layout-commons.scss | 28 +-- src/main/scss/components/_app-bar.scss | 12 +- src/main/scss/components/_breadcrumbs.scss | 158 +++++-------- src/main/scss/components/_dropdowns.scss | 2 +- src/main/scss/components/_page-header.scss | 211 +++++++++++------- .../scss/components/_side-panel-tasks.scss | 11 +- .../test/java/hudson/model/HudsonTest.java | 4 +- .../java/hudson/model/Security3349Test.java | 6 +- .../test/java/hudson/search/SearchTest.java | 2 +- .../ActionsTest/RootActionImpl/action.jelly | 6 - .../images/symbols/person-circle.svg | 6 +- webpack.config.js | 1 + 63 files changed, 1051 insertions(+), 989 deletions(-) rename test/src/test/java/lib/hudson/ActionsTest.java => core/src/main/java/jenkins/model/navigation/SearchAction.java (65%) create mode 100644 core/src/main/java/jenkins/model/navigation/UserAction.java delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.jelly delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_bg.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_de.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_fr.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_it.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_pl.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_pt_BR.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_sv_SE.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_tr.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_zh_TW.properties delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.css delete mode 100644 core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js create mode 100644 core/src/main/resources/jenkins/model/navigation/SearchAction/tooltip.jelly create mode 100644 core/src/main/resources/jenkins/model/navigation/UserAction/jumplist.jelly create mode 100644 core/src/main/resources/jenkins/views/JenkinsHeader/logo.jelly create mode 100644 core/src/main/resources/lib/layout/header/actions.jelly create mode 100644 src/main/js/components/header/actions-overflow.js create mode 100644 src/main/js/components/header/breadcrumbs-overflow.js create mode 100644 src/main/js/components/header/index.js delete mode 100644 test/src/test/resources/lib/hudson/ActionsTest/RootActionImpl/action.jelly diff --git a/core/src/main/java/hudson/model/ManageJenkinsAction.java b/core/src/main/java/hudson/model/ManageJenkinsAction.java index 776b37c4f2..9590289330 100644 --- a/core/src/main/java/hudson/model/ManageJenkinsAction.java +++ b/core/src/main/java/hudson/model/ManageJenkinsAction.java @@ -27,6 +27,10 @@ package hudson.model; import hudson.Extension; import hudson.Util; import java.io.IOException; +import java.util.Collection; +import java.util.Collections; +import java.util.Optional; +import jenkins.management.AdministrativeMonitorsDecorator; import jenkins.management.Badge; import jenkins.model.Jenkins; import jenkins.model.ModelObjectWithContextMenu; @@ -40,11 +44,11 @@ import org.kohsuke.stapler.StaplerRequest2; import org.kohsuke.stapler.StaplerResponse2; /** - * Adds the "Manage Jenkins" link to the top page. + * Adds the "Manage Jenkins" link to the navigation bar. * * @author Kohsuke Kawaguchi */ -@Extension(ordinal = 100) @Symbol("manageJenkins") +@Extension(ordinal = 998) @Symbol("manageJenkins") public class ManageJenkinsAction implements RootAction, StaplerFallback, ModelObjectWithContextMenu { @Override public String getIconFileName() { @@ -88,4 +92,29 @@ public class ManageJenkinsAction implements RootAction, StaplerFallback, ModelOb // If neither is the case, rewrite the relative URL to point to inside the /manage/ URL space menu.add("manage/" + url, icon, iconXml, text, post, requiresConfirmation, badge, message); } + + @Override + public Badge getBadge() { + Jenkins jenkins = Jenkins.get(); + AdministrativeMonitorsDecorator decorator = jenkins.getExtensionList(PageDecorator.class) + .get(AdministrativeMonitorsDecorator.class); + + if (decorator == null) { + return null; + } + + Collection activeAdministrativeMonitors = Optional.ofNullable(decorator.getMonitorsToDisplay()).orElse(Collections.emptyList()); + boolean anySecurity = activeAdministrativeMonitors.stream().anyMatch(AdministrativeMonitor::isSecurity); + + if (activeAdministrativeMonitors.isEmpty()) { + return null; + } + + int size = activeAdministrativeMonitors.size(); + String tooltip = size > 1 ? Messages.ManageJenkinsAction_notifications(size) : Messages.ManageJenkinsAction_notification(size); + + return new Badge(String.valueOf(size), + tooltip, + anySecurity ? Badge.Severity.DANGER : Badge.Severity.WARNING); + } } diff --git a/core/src/main/java/hudson/model/MyViewsProperty.java b/core/src/main/java/hudson/model/MyViewsProperty.java index 2c5f9f49ab..2437b44a6e 100644 --- a/core/src/main/java/hudson/model/MyViewsProperty.java +++ b/core/src/main/java/hudson/model/MyViewsProperty.java @@ -321,7 +321,7 @@ public class MyViewsProperty extends UserProperty implements ModifiableViewGroup return Jenkins.get().getMyViewsTabBar(); } - @Extension @Symbol("myView") + @Symbol("myView") public static class GlobalAction implements RootAction { @Override diff --git a/core/src/main/java/hudson/model/RootAction.java b/core/src/main/java/hudson/model/RootAction.java index 9c431ee635..8226e67507 100644 --- a/core/src/main/java/hudson/model/RootAction.java +++ b/core/src/main/java/hudson/model/RootAction.java @@ -24,8 +24,10 @@ package hudson.model; +import edu.umd.cs.findbugs.annotations.CheckForNull; import hudson.Extension; import hudson.ExtensionPoint; +import jenkins.management.Badge; /** * Marker interface for actions that are added to {@link jenkins.model.Jenkins}. @@ -38,4 +40,14 @@ import hudson.ExtensionPoint; * @since 1.311 */ public interface RootAction extends Action, ExtensionPoint { + + /** + * A {@link Badge} shown on the button for the action. + * + * @return badge or {@code null} if no badge should be shown. + * @since TODO + */ + default @CheckForNull Badge getBadge() { + return null; + } } diff --git a/core/src/main/java/jenkins/management/AdministrativeMonitorsDecorator.java b/core/src/main/java/jenkins/management/AdministrativeMonitorsDecorator.java index d531f898c0..578c8d9055 100644 --- a/core/src/main/java/jenkins/management/AdministrativeMonitorsDecorator.java +++ b/core/src/main/java/jenkins/management/AdministrativeMonitorsDecorator.java @@ -28,7 +28,6 @@ import edu.umd.cs.findbugs.annotations.NonNull; import hudson.Extension; import hudson.diagnosis.ReverseProxySetupMonitor; import hudson.model.AdministrativeMonitor; -import hudson.model.ManageJenkinsAction; import hudson.model.PageDecorator; import hudson.util.HudsonIsLoading; import hudson.util.HudsonIsRestarting; @@ -56,9 +55,6 @@ public class AdministrativeMonitorsDecorator extends PageDecorator { public AdministrativeMonitorsDecorator() { // otherwise this would be added to every internal context menu building request ignoredJenkinsRestOfUrls.add("contextMenu"); - - // don't show here to allow admins to disable malfunctioning monitors via AdministrativeMonitorsDecorator - ignoredJenkinsRestOfUrls.add("configure"); } @NonNull @@ -163,11 +159,6 @@ public class AdministrativeMonitorsDecorator extends PageDecorator { return null; } - // Don't show on Manage Jenkins - if (o instanceof ManageJenkinsAction) { - return null; - } - // don't show for some URLs served directly by Jenkins if (o instanceof Jenkins) { String url = a.getRestOfUrl(); diff --git a/core/src/main/java/jenkins/model/Jenkins.java b/core/src/main/java/jenkins/model/Jenkins.java index 904613f74d..7c43695fd4 100644 --- a/core/src/main/java/jenkins/model/Jenkins.java +++ b/core/src/main/java/jenkins/model/Jenkins.java @@ -2369,7 +2369,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve public SearchIndexBuilder makeSearchIndex() { SearchIndexBuilder builder = super.makeSearchIndex(); - this.actions.stream().filter(e -> e.getIconFileName() != null).forEach(action -> builder.add(new SearchItem() { + this.actions.stream().filter(e -> !(e.getIconFileName() == null || e.getUrlName() == null)).forEach(action -> builder.add(new SearchItem() { @Override public String getSearchName() { return action.getDisplayName(); diff --git a/test/src/test/java/lib/hudson/ActionsTest.java b/core/src/main/java/jenkins/model/navigation/SearchAction.java similarity index 65% rename from test/src/test/java/lib/hudson/ActionsTest.java rename to core/src/main/java/jenkins/model/navigation/SearchAction.java index 287138d2a3..36a56bda2f 100644 --- a/test/src/test/java/lib/hudson/ActionsTest.java +++ b/core/src/main/java/jenkins/model/navigation/SearchAction.java @@ -1,7 +1,7 @@ /* * The MIT License * - * Copyright (c) 2011, CloudBees, Inc. + * 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 @@ -22,31 +22,29 @@ * THE SOFTWARE. */ -package lib.hudson; +package jenkins.model.navigation; -import static org.junit.Assert.assertNotNull; - -import hudson.model.InvisibleAction; +import hudson.Extension; import hudson.model.RootAction; -import org.junit.Rule; -import org.junit.Test; -import org.jvnet.hudson.test.JenkinsRule; -import org.jvnet.hudson.test.TestExtension; /** - * @author Kohsuke Kawaguchi + * TODO */ -public class ActionsTest { +@Extension(ordinal = 999) +public class SearchAction implements RootAction { - @Rule - public JenkinsRule j = new JenkinsRule(); - - @Test - public void override() throws Exception { - assertNotNull(j.createWebClient().goTo("").getElementById("bravo")); + @Override + public String getIconFileName() { + return "symbol-search"; } - @TestExtension - public static class RootActionImpl extends InvisibleAction implements RootAction { + @Override + public String getDisplayName() { + return "Search"; + } + + @Override + public String getUrlName() { + return null; } } diff --git a/core/src/main/java/jenkins/model/navigation/UserAction.java b/core/src/main/java/jenkins/model/navigation/UserAction.java new file mode 100644 index 0000000000..5900e3d097 --- /dev/null +++ b/core/src/main/java/jenkins/model/navigation/UserAction.java @@ -0,0 +1,96 @@ +/* + * 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.navigation; + +import static hudson.Functions.getAvatar; + +import hudson.Extension; +import hudson.model.Action; +import hudson.model.RootAction; +import hudson.model.User; +import java.util.ArrayList; +import java.util.List; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.NoExternalUse; + +/** + * Display the user avatar in the navigation bar. + * Provides a handy jumplist for common user actions. + */ +@Extension(ordinal = -1) +public class UserAction implements RootAction { + + @Override + public String getIconFileName() { + User current = User.current(); + + if (current == null) { + return null; + } + + return getAvatar(current, "96x96"); + } + + @Override + public String getDisplayName() { + User current = User.current(); + + if (current == null) { + return null; + } + + return current.getFullName(); + } + + @Override + public String getUrlName() { + User current = User.current(); + + if (current == null) { + return null; + } + + return current.getUrl(); + } + + @Restricted(NoExternalUse.class) + public User getUser() { + return User.current(); + } + + @Restricted(NoExternalUse.class) + public List getActions() { + User current = User.current(); + + if (User.current() == null) { + return null; + } + + List actions = new ArrayList<>(); + actions.addAll(current.getPropertyActions()); + actions.addAll(current.getTransientActions()); + return actions.stream().filter(e -> e.getIconFileName() != null).toList(); + } +} diff --git a/core/src/main/java/jenkins/views/Header.java b/core/src/main/java/jenkins/views/Header.java index 8418ccb871..083f241340 100644 --- a/core/src/main/java/jenkins/views/Header.java +++ b/core/src/main/java/jenkins/views/Header.java @@ -1,8 +1,17 @@ package jenkins.views; +import hudson.ExtensionComponent; import hudson.ExtensionList; import hudson.ExtensionPoint; +import hudson.model.Action; +import hudson.model.RootAction; +import java.util.Comparator; +import java.util.List; +import java.util.Map; import java.util.Optional; +import java.util.stream.Collectors; +import jenkins.model.Jenkins; +import org.jenkins.ui.icon.IconSpec; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.NoExternalUse; @@ -54,4 +63,28 @@ public abstract class Header implements ExtensionPoint { return header.orElseGet(JenkinsHeader::new); } + /** + * @return a list of {@link Action} to show in the header, defaults to {@link hudson.model.RootAction} extensions + */ + @Restricted(NoExternalUse.class) + public List getActions() { + // There's an issue where new actions (e.g. a new plugin installation) don't appear in the order + // of their ordinal annotation - to work around that we manually sort the list + Map rootActionsOrdinal = ExtensionList.lookup(RootAction.class) + .getComponents() + .stream() + .collect(Collectors.toMap( + c -> c.getInstance().getClass().getName(), + ExtensionComponent::ordinal + )); + + return Jenkins.get() + .getActions() + .stream() + .filter(e -> e.getIconFileName() != null || (e instanceof IconSpec is && is.getIconClassName() != null)) + .sorted(Comparator.comparingDouble( + a -> rootActionsOrdinal.getOrDefault(a.getClass().getName(), Double.MAX_VALUE) + ).reversed()) + .toList(); + } } diff --git a/core/src/main/java/jenkins/views/PartialHeader.java b/core/src/main/java/jenkins/views/PartialHeader.java index 964ccbb3b0..7a19468e6d 100644 --- a/core/src/main/java/jenkins/views/PartialHeader.java +++ b/core/src/main/java/jenkins/views/PartialHeader.java @@ -25,7 +25,7 @@ public abstract class PartialHeader extends Header { * * Increment this number when an incompatible change is made to the header (like the search form API). */ - private static final int compatibilityHeaderVersion = 1; + private static final int compatibilityHeaderVersion = 2; @Override public final boolean isCompatible() { diff --git a/core/src/main/resources/hudson/model/ManageJenkinsAction/index.jelly b/core/src/main/resources/hudson/model/ManageJenkinsAction/index.jelly index eb76bed16c..4b3d408d06 100644 --- a/core/src/main/resources/hudson/model/ManageJenkinsAction/index.jelly +++ b/core/src/main/resources/hudson/model/ManageJenkinsAction/index.jelly @@ -28,11 +28,6 @@ THE SOFTWARE. - - - - - @@ -52,58 +47,58 @@ THE SOFTWARE.

${category.key.label}

${taskTags!=null and attrs.contextMenu!='false' ? taskTags.addHeader(category.key.label) : null}
- - -
- - - - - - - ${taskTags!=null and attrs.contextMenu!='false' ? it.addContextMenuItem(taskTags, m.urlName, iconSrc, iconXml, m.displayName, m.requiresPOST, m.requiresConfirmation, m.badge, sure) : null} - - - - -
-
${m.displayName}
-
-
-
-
-
- - - -
-
${m.displayName}
-
-
-
-
-
- - - -
-
${m.displayName}
-
-
-
-
-
-
-
-
-
+ + +
+ + + + + + + ${taskTags!=null and attrs.contextMenu!='false' ? it.addContextMenuItem(taskTags, m.urlName, iconSrc, iconXml, m.displayName, m.requiresPOST, m.requiresConfirmation, m.badge, sure) : null} + + + + +
+
${m.displayName}
+
+
+
+
+
+ + + +
+
${m.displayName}
+
+
+
+
+
+ + + +
+
${m.displayName}
+
+
+
+
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/model/Messages.properties b/core/src/main/resources/hudson/model/Messages.properties index f8a0279fe1..9b92c3bce5 100644 --- a/core/src/main/resources/hudson/model/Messages.properties +++ b/core/src/main/resources/hudson/model/Messages.properties @@ -199,6 +199,8 @@ LabelExpression.LabelLink=Label {1} matches {3,choice,0#no LabelExpression.NoMatch=No agent/cloud matches this label expression. LabelExpression.NoMatch_DidYouMean=No agent/cloud matches this label expression. Did you mean ‘{1}’ instead of ‘{0}’? ManageJenkinsAction.DisplayName=Manage Jenkins +ManageJenkinsAction.notification={0} notification +ManageJenkinsAction.notifications={0} notifications MultiStageTimeSeries.EMPTY_STRING= ParametersDefinitionProperty.BuildButtonText=Build Queue.AllNodesOffline=All nodes of label ‘{0}’ are offline diff --git a/core/src/main/resources/hudson/model/View/sidepanel.jelly b/core/src/main/resources/hudson/model/View/sidepanel.jelly index e174117add..bfdcf80cc0 100644 --- a/core/src/main/resources/hudson/model/View/sidepanel.jelly +++ b/core/src/main/resources/hudson/model/View/sidepanel.jelly @@ -60,7 +60,6 @@ THE SOFTWARE. - diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/loginLink.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/loginLink.jelly index cd989c23f0..ae5fa40935 100644 --- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/loginLink.jelly +++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/loginLink.jelly @@ -25,7 +25,4 @@ THE SOFTWARE. - - ${%sign up} - diff --git a/core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly b/core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly index 8fb92ed3dd..7d3c1268f4 100644 --- a/core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly +++ b/core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly @@ -24,6 +24,12 @@ THE SOFTWARE. --> - - ${%login} + + + ${%signIn} + diff --git a/core/src/main/resources/hudson/security/SecurityRealm/loginLink.properties b/core/src/main/resources/hudson/security/SecurityRealm/loginLink.properties index a02dabb171..f32eb6aaae 100644 --- a/core/src/main/resources/hudson/security/SecurityRealm/loginLink.properties +++ b/core/src/main/resources/hudson/security/SecurityRealm/loginLink.properties @@ -21,3 +21,5 @@ # THE SOFTWARE. login=log in +signIn=Sign in +signInTooltip=Sign in to access and manage your Jenkins jobs diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.jelly b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.jelly deleted file mode 100644 index ff40bc5436..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.jelly +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - -
- - - - -
- - - - - - diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.properties deleted file mode 100644 index 59c787763b..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.properties +++ /dev/null @@ -1,2 +0,0 @@ -tooltip=There are {0} active administrative monitors. -tooltipSec=There are {0} active security administrative monitors. diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_bg.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_bg.properties deleted file mode 100644 index 53275bc89b..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_bg.properties +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License -# -# Bulgarian translation: Copyright (c) 2017, Alexander Shopov -# -# 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. - -# There are {0} active administrative monitors. -tooltip=\ - В момента има {0} предупреждения. -Manage\ Jenkins=\ - Управление на Jenkins diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_de.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_de.properties deleted file mode 100644 index df9d5a8ab8..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_de.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright (c) 2017 Daniel Beck and a number of other of contributors -# -# 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. - -Manage\ Jenkins=Jenkins verwalten -tooltip={0,choice,0#Keine Administrator-Warnungen sind|1#{0} Administrator-Warnung ist|1<{0} Administrator-Warnungen sind} aktiv. diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_fr.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_fr.properties deleted file mode 100644 index 870a942ce7..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_fr.properties +++ /dev/null @@ -1,2 +0,0 @@ -tooltip=Il existe {0} moniteurs d''administration activés. -tooltipSec=Il existe {0} moniteurs d''administration de sécurité activés. diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_it.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_it.properties deleted file mode 100644 index 9967613a71..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_it.properties +++ /dev/null @@ -1,25 +0,0 @@ -# The MIT License -# -# Italian localization plugin for Jenkins -# Copyright © 2020 Alessandro Menti -# -# 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. - -Manage\ Jenkins=Gestisci Jenkins -tooltip=Ci sono {0} monitor amministrativi attivi. diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_pl.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_pl.properties deleted file mode 100644 index 963548d361..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_pl.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright (c) 2016-2017, Damian Szczepanik -# -# 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. -# There are {0} active administrative monitors. -tooltip=Znaleziono {0} aktywnych powiadomień dla administratorów -Manage\ Jenkins=Zarządzaj Jenkinsem diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_pt_BR.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_pt_BR.properties deleted file mode 100644 index 103fb02ed7..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_pt_BR.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors -# -# 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. - -tooltip=Existem {0} monitores administrativos ativos. -tooltipSec=Existem {0} monitores administrativos de segurança ativos. diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_sv_SE.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_sv_SE.properties deleted file mode 100644 index 477e8b1001..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_sv_SE.properties +++ /dev/null @@ -1,2 +0,0 @@ -tooltip=Det finns {0} aktiva administrativa övervakningar. -tooltipSec=Det finns {0} aktiva säkerhetsadministrativa övervakningar. diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_tr.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_tr.properties deleted file mode 100644 index 8447c064c4..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_tr.properties +++ /dev/null @@ -1,25 +0,0 @@ -# The MIT License -# -# Copyright (c) 2021, Mustafa Ulu -# -# 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. - -Manage\ Jenkins=Jenkins''i Yönet -tooltip={0} adet aktif yönetimsel gösterge var. -tooltipSec={0} adet aktif yönetimsel güvenlik göstergesi var. diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_zh_TW.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_zh_TW.properties deleted file mode 100644 index 8fb68379da..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer_zh_TW.properties +++ /dev/null @@ -1,2 +0,0 @@ -tooltip=有 {0} 個啟用中的管理監視器。 -tooltipSec=有 {0} 個啟用中的安全性管理監視器。 diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.css b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.css deleted file mode 100644 index 27540b350d..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.css +++ /dev/null @@ -1,184 +0,0 @@ -.am-container { - display: contents; -} - -.am-button { - position: relative; -} - -.am-button .am-monitor__indicator-mobile { - display: none; - position: absolute; - top: 0.25rem; - right: 0.25rem; - border-radius: 50%; - width: 0.65rem; - height: 0.65rem; - background-color: var(--warning-color); -} -.security-am .am-monitor__indicator-mobile { - background-color: var(--error-color); -} - -.am-button .am-monitor__count { - display: inline-flex; - justify-content: center; - align-items: center; - height: 18px; - min-width: 18px; - - color: #fff; - background-color: var(--warning-color); - font-weight: var(--font-bold-weight); - font-size: var(--font-size-xs); - - border-radius: 16px; -} -.am-button.security-am .am-monitor__count { - color: #fff; - background-color: var(--error-color); -} -.am-container div.am-list { - position: absolute; - top: 48px; - right: 2%; - height: auto; - padding: var(--section-padding); - text-align: left; - display: block; - background-color: var(--background); - box-shadow: var(--dropdown-box-shadow); - border-radius: 15px; - opacity: 0; - z-index: 0; - transform: scale(0); -} - -.am-container.am-hidden div.am-list { - animation: hide-am-list 300ms ease-in 1 normal; -} - -.am-container.visible div.am-list { - opacity: 1; - animation: show-am-list 300ms ease-in 1 normal forwards; - z-index: 1000; -} - -@keyframes show-am-list { - from { - opacity: 0; - visibility: hidden; - transform: translateY(-10px) scale(0.975); - } - to { - opacity: 1; - visibility: visible; - transform: scale(1); - } -} - -@keyframes hide-am-list { - from { - opacity: 1; - visibility: visible; - transform: scale(1); - z-index: 1000; - } - to { - opacity: 0; - visibility: hidden; - transform: translateY(-10px) scale(0.975); - z-index: 1000; - } -} - -.am-container .am-message { - display: block; - line-height: 1.4em; - margin-bottom: 1.4em; -} -.am-container.visible .am-button:after { - background: var(--button-background--hover); -} - -.am-message-list { - padding: 0; - margin: 0; -} - -.am-container .am-message .alert form, -.am-container .am-message .jenkins-alert form { - position: relative; - float: right; - margin: -6px 0 0 0 !important; - gap: 0.5rem; - display: flex; - padding-left: 0.5rem; -} - -.am-container .am-message .alert form span, -.am-container .am-message .jenkins-alert form span { - margin: 0 0 0 4px !important; -} - -.am-container .am-message .alert, -.am-container .am-message .jenkins-alert { - margin-bottom: 0 !important; -} - -.am-container .am-message dl dt::after { - content: ": "; -} - -/* Restore hyperlink style overriden by the page header */ -.am-container .am-list a:link { - display: inline-block; - color: var(--link-color); - text-decoration: underline; - margin-right: 0; - padding: 0; - font-weight: var(--link-font-weight); -} -.am-container .am-list a:visited { - color: var(--link-color); -} -.am-container .am-list a:hover, -.am-container .am-list a:focus, -.am-container .am-list a:active { - color: var(--link-color); - background-color: transparent; - text-decoration: underline; - text-decoration: var(--link-text-decoration--hover); -} - -.am-container .am-list .jenkins-alert-success a { - color: var(--alert-success-text-color); -} - -.am-container .am-list .jenkins-alert-info a { - color: var(--alert-info-text-color); -} - -.am-container .am-list .jenkins-alert-warning a { - color: var(--alert-warning-text-color); -} - -.am-container .am-list .jenkins-alert-danger a { - color: var(--alert-danger-text-color); -} - -@media screen and (max-width: 576px) { - /* Hide non-security monitors on mobile view to avoid messing up the heading */ - #visible-am-container { - display: none; - } -} - -@media screen and (max-width: 768px) { - .am-button .am-monitor__indicator-mobile { - display: block; - } - .am-button .am-monitor__count { - display: none; - } -} diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js deleted file mode 100644 index 5982e03025..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js +++ /dev/null @@ -1,128 +0,0 @@ -(function () { - function initializeAmMonitor(amMonitorRoot, options) { - var button = amMonitorRoot.querySelector(".am-button"); - var amList = amMonitorRoot.querySelector(".am-list"); - if (button === null || amList === null) { - return null; - } - - var url = button.getAttribute("data-href"); - - function onClose(e) { - var list = amList; - var el = e.target; - while (el) { - if (el === list) { - return; // clicked in the list - } - el = el.parentElement; - } - close(); - } - - function onEscClose(e) { - var escapeKeyCode = 27; - if (e.keyCode === escapeKeyCode) { - close(); - } - } - - function show() { - if (options.closeAll) { - options.closeAll(); - } - - fetch(url).then((rsp) => { - if (rsp.ok) { - rsp.text().then((responseText) => { - var popupContent = responseText; - amList.innerHTML = popupContent; - amMonitorRoot.classList.add("visible"); - amMonitorRoot.classList.remove("am-hidden"); - document.addEventListener("click", onClose); - document.addEventListener("keydown", onEscClose); - - // Applies all initialization code to the elements within the popup - // Among other things, this sets the CSRF crumb to the forms within - Behaviour.applySubtree(amList); - }); - } - }); - } - - function close() { - if (amMonitorRoot.classList.contains("visible")) { - amMonitorRoot.classList.add("am-hidden"); - } - amMonitorRoot.classList.remove("visible"); - document.removeEventListener("click", onClose); - document.removeEventListener("keydown", onEscClose); - } - - function toggle(e) { - if (amMonitorRoot.classList.contains("visible")) { - close(); - } else { - show(); - } - e.preventDefault(); - } - - function startListeners() { - button.addEventListener("click", toggle); - } - - return { - close: close, - startListeners: startListeners, - }; - } - - document.addEventListener("DOMContentLoaded", function () { - var monitorWidgets; - - function closeAll() { - monitorWidgets.forEach(function (widget) { - widget.close(); - }); - } - - var normalMonitors = initializeAmMonitor( - document.getElementById("visible-am-container"), - { - closeAll: closeAll, - }, - ); - var securityMonitors = initializeAmMonitor( - document.getElementById("visible-sec-am-container"), - { - closeAll: closeAll, - }, - ); - monitorWidgets = [normalMonitors, securityMonitors].filter( - function (widget) { - return widget !== null; - }, - ); - - monitorWidgets.forEach(function (widget) { - widget.startListeners(); - }); - }); -})(); - -document.addEventListener("DOMContentLoaded", function () { - var amContainer = document.getElementById("visible-am-container"); - var amInsertion = document.getElementById("visible-am-insertion"); - - if (amInsertion) { - amInsertion.appendChild(amContainer); - } - - var secAmContainer = document.getElementById("visible-sec-am-container"); - var secAmInsertion = document.getElementById("visible-sec-am-insertion"); - - if (secAmInsertion) { - secAmInsertion.appendChild(secAmContainer); - } -}); diff --git a/core/src/main/resources/jenkins/model/Jenkins/configure.jelly b/core/src/main/resources/jenkins/model/Jenkins/configure.jelly index 91d01c69f5..7b7ce31aed 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/configure.jelly +++ b/core/src/main/resources/jenkins/model/Jenkins/configure.jelly @@ -29,7 +29,7 @@ THE SOFTWARE. - + diff --git a/core/src/main/resources/jenkins/model/navigation/SearchAction/tooltip.jelly b/core/src/main/resources/jenkins/model/navigation/SearchAction/tooltip.jelly new file mode 100644 index 0000000000..400875cd3d --- /dev/null +++ b/core/src/main/resources/jenkins/model/navigation/SearchAction/tooltip.jelly @@ -0,0 +1,9 @@ + + +
+ + ${%Search} + + +
+
diff --git a/core/src/main/resources/jenkins/model/navigation/UserAction/jumplist.jelly b/core/src/main/resources/jenkins/model/navigation/UserAction/jumplist.jelly new file mode 100644 index 0000000000..6d5138ea03 --- /dev/null +++ b/core/src/main/resources/jenkins/model/navigation/UserAction/jumplist.jelly @@ -0,0 +1,25 @@ + + + + +
+ +
+ ${it.user.fullName} +
+
+ + + + + + + + + + +
\ No newline at end of file diff --git a/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly b/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly index 1f22ef5063..941787db6a 100644 --- a/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly +++ b/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly @@ -1,8 +1,20 @@ - - + + + +