From 21e275080b4b00d2daf122831aeabb6cea940e10 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 13 Jul 2024 23:23:04 +0100 Subject: [PATCH 1/2] Disable dependents toggle in plugin manager with system read --- .../hudson/PluginManager/installed.jelly | 102 +++++++++--------- 1 file changed, 49 insertions(+), 53 deletions(-) diff --git a/core/src/main/resources/hudson/PluginManager/installed.jelly b/core/src/main/resources/hudson/PluginManager/installed.jelly index 3c3ee43e0193..16d48e425d1f 100644 --- a/core/src/main/resources/hudson/PluginManager/installed.jelly +++ b/core/src/main/resources/hudson/PluginManager/installed.jelly @@ -170,56 +170,52 @@ THE SOFTWARE.
- -
- -
-
+ +
+ +
+
- -
- - -

${%Uninstallation pending}

-
- - -
- - - - - - - - - - - -

- ${%detached-many-dependents(impliedDependents.size())} -

-
-
-
-
- -
- - - -
-
+ + +
+ + +

${%Uninstallation pending}

+
+ + +
+ + + + + + + + + + + +

+ ${%detached-many-dependents(impliedDependents.size())} +

+
+
+
+
+ -
-
-
- - + +
+
+
+ From 96b4e88d23faf63df80cf600da61e628b81bba93 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 26 Aug 2024 12:20:35 +0100 Subject: [PATCH 2/2] Re-add dependency list --- .../resources/hudson/PluginManager/_table.js | 33 ++++++++++--------- .../hudson/PluginManager/installed.jelly | 7 ++++ 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/core/src/main/resources/hudson/PluginManager/_table.js b/core/src/main/resources/hudson/PluginManager/_table.js index 8174fa1e833d..4806c3f573bb 100644 --- a/core/src/main/resources/hudson/PluginManager/_table.js +++ b/core/src/main/resources/hudson/PluginManager/_table.js @@ -504,24 +504,27 @@ window.addEventListener("load", function () { }); }); - // Enable/disable the 'Update' button depending on if any updates are checked - const anyCheckboxesSelected = () => { - return ( - document.querySelectorAll("input[type='checkbox']:checked:not(:disabled)") - .length > 0 - ); - }; const updateButton = document.querySelector("#button-update"); - const checkboxes = document.querySelectorAll( - "input[type='checkbox'], [data-select], .jenkins-table__checkbox", - ); - checkboxes.forEach((checkbox) => { - checkbox.addEventListener("click", () => { - setTimeout(() => { - updateButton.disabled = !anyCheckboxesSelected(); + if (updateButton) { + // Enable/disable the 'Update' button depending on if any updates are checked + const anyCheckboxesSelected = () => { + return ( + document.querySelectorAll( + "input[type='checkbox']:checked:not(:disabled)", + ).length > 0 + ); + }; + const checkboxes = document.querySelectorAll( + "input[type='checkbox'], [data-select], .jenkins-table__checkbox", + ); + checkboxes.forEach((checkbox) => { + checkbox.addEventListener("click", () => { + setTimeout(() => { + updateButton.disabled = !anyCheckboxesSelected(); + }); }); }); - }); + } // Show update center error if element exists const updateCenterError = document.querySelector("#update-center-error"); diff --git a/core/src/main/resources/hudson/PluginManager/installed.jelly b/core/src/main/resources/hudson/PluginManager/installed.jelly index 16d48e425d1f..951e0cf2877d 100644 --- a/core/src/main/resources/hudson/PluginManager/installed.jelly +++ b/core/src/main/resources/hudson/PluginManager/installed.jelly @@ -99,6 +99,13 @@ THE SOFTWARE. + +
+ + + +
+