From 43ccad7ad420140fec53ea07035a72cd01aeb002 Mon Sep 17 00:00:00 2001 From: Yaroslav Afenkin <91559310+yaroslavafenkin@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:30:34 +0200 Subject: [PATCH 1/2] [JENKINS-74017] Extract inline script block from `BapSshPublisherPlugin/config.jelly` --- .../BapSshPublisherPlugin/config.jelly | 10 +++++----- src/main/webapp/js/pos.js | 10 +++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/main/resources/jenkins/plugins/publish_over_ssh/BapSshPublisherPlugin/config.jelly b/src/main/resources/jenkins/plugins/publish_over_ssh/BapSshPublisherPlugin/config.jelly index c4454967..3172747e 100644 --- a/src/main/resources/jenkins/plugins/publish_over_ssh/BapSshPublisherPlugin/config.jelly +++ b/src/main/resources/jenkins/plugins/publish_over_ssh/BapSshPublisherPlugin/config.jelly @@ -35,11 +35,11 @@ + + + diff --git a/src/main/webapp/js/pos.js b/src/main/webapp/js/pos.js index ab3cb84e..61196f27 100644 --- a/src/main/webapp/js/pos.js +++ b/src/main/webapp/js/pos.js @@ -106,4 +106,12 @@ var sshBehave = { } }; -Behaviour.register(sshBehave); \ No newline at end of file +Behaviour.register(sshBehave); + +window.addEventListener("DOMContentLoaded", function() { + document.querySelectorAll(".pos-host-configs-data-holder").forEach(function(dataHolder) { + const { configName, effectiveDisableExec } = dataHolder.dataset; + + exec_disabled[configName] = effectiveDisableExec === "true"; + }); +}); From 5061cc8d4b2de6f6613f95668516a7e9aaca5aab Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 29 Oct 2024 10:38:16 -0700 Subject: [PATCH 2/2] Consistent formatting --- src/main/webapp/js/pos.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/js/pos.js b/src/main/webapp/js/pos.js index 4a0baebe..37371cc6 100644 --- a/src/main/webapp/js/pos.js +++ b/src/main/webapp/js/pos.js @@ -120,8 +120,8 @@ Behaviour.specify(".ssh-transfer-source-files-config-name", "SshTransfer_syncSou element.value = element.closest("div[name='publishers']").querySelector("select.ssh-config-name").value; }); -window.addEventListener("DOMContentLoaded", function() { - document.querySelectorAll(".pos-host-configs-data-holder").forEach(function(dataHolder) { +window.addEventListener("DOMContentLoaded", function () { + document.querySelectorAll(".pos-host-configs-data-holder").forEach(function (dataHolder) { const { configName, effectiveDisableExec } = dataHolder.dataset; exec_disabled[configName] = effectiveDisableExec === "true";