From 9367be02a09f4db325ec743e43ebb7ca0892e33e Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Wed, 6 Nov 2024 18:43:39 +0000 Subject: [PATCH 1/3] Disable YUI by default --- .../experimentalflags/RemoveYuiUserExperimentalFlag.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/jenkins/model/experimentalflags/RemoveYuiUserExperimentalFlag.java b/core/src/main/java/jenkins/model/experimentalflags/RemoveYuiUserExperimentalFlag.java index e8f8dcc31775..5f8620862fce 100644 --- a/core/src/main/java/jenkins/model/experimentalflags/RemoveYuiUserExperimentalFlag.java +++ b/core/src/main/java/jenkins/model/experimentalflags/RemoveYuiUserExperimentalFlag.java @@ -24,6 +24,7 @@ package jenkins.model.experimentalflags; +import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import hudson.Extension; import org.kohsuke.accmod.Restricted; @@ -46,4 +47,10 @@ public String getDisplayName() { public String getShortDescription() { return "Remove YUI from all Jenkins UI pages. This will break anything that depends on YUI"; } + + @NonNull + @Override + public Boolean getDefaultValue() { + return true; + } } From 445736fce1574045fbd8fea1a12c7b2f19251cea Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 10 Dec 2024 19:27:08 +0000 Subject: [PATCH 2/3] Remove yui debug logger --- war/src/main/webapp/scripts/hudson-behavior.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index 9ae3d9298d37..043dc4677375 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -194,16 +194,6 @@ var resURL = "not-defined-yet"; // eslint-disable-line no-unused-vars } })(); -(function initializeYUIDebugLogReader() { - Behaviour.addLoadEvent(function () { - var logReaderElement = document.getElementById("yui-logreader"); - if (logReaderElement !== null) { - var logReader = new YAHOO.widget.LogReader("yui-logreader"); - logReader.collapse(); - } - }); -})(); - // Form check code //======================================================== var FormChecker = { From 9f33f6284880269172e7624d063a55c152f53bd5 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 10 Dec 2024 21:43:04 +0000 Subject: [PATCH 3/3] Allow customising yui default value --- .../model/experimentalflags/RemoveYuiUserExperimentalFlag.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/jenkins/model/experimentalflags/RemoveYuiUserExperimentalFlag.java b/core/src/main/java/jenkins/model/experimentalflags/RemoveYuiUserExperimentalFlag.java index 5f8620862fce..418f9c4b5406 100644 --- a/core/src/main/java/jenkins/model/experimentalflags/RemoveYuiUserExperimentalFlag.java +++ b/core/src/main/java/jenkins/model/experimentalflags/RemoveYuiUserExperimentalFlag.java @@ -27,6 +27,7 @@ import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import hudson.Extension; +import jenkins.util.SystemProperties; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.NoExternalUse; @@ -51,6 +52,6 @@ public String getShortDescription() { @NonNull @Override public Boolean getDefaultValue() { - return true; + return SystemProperties.getBoolean(RemoveYuiUserExperimentalFlag.class.getName() + ".defaultValue", true); } }