From 005441dfeead5d13eb66b3ae174947859dc9ece6 Mon Sep 17 00:00:00 2001 From: Zbynek Konecny Date: Thu, 7 Nov 2024 00:45:10 +0100 Subject: [PATCH] Replace dropdown button to remove dependency on YUI (#483) --- pom.xml | 6 +-- .../ComputeEngineCloud/computerSet.jelly | 40 ++++++++++--------- .../ComputeEngineCloud/provision.js | 8 ++++ 3 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 src/main/resources/com/google/jenkins/plugins/computeengine/ComputeEngineCloud/provision.js diff --git a/pom.xml b/pom.xml index 49dcf76b..f3d480a9 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ 4 999999-SNAPSHOT jenkinsci/${project.artifactId}-plugin - 2.401.3 + 2.452.3 0 ${skipTests} true @@ -89,8 +89,8 @@ io.jenkins.tools.bom - bom-2.401.x - 2671.va_73a_b_4c103fb_ + bom-2.452.x + 3208.vb_21177d4b_cd9 pom import diff --git a/src/main/resources/com/google/jenkins/plugins/computeengine/ComputeEngineCloud/computerSet.jelly b/src/main/resources/com/google/jenkins/plugins/computeengine/ComputeEngineCloud/computerSet.jelly index b3e3687b..378e4f65 100644 --- a/src/main/resources/com/google/jenkins/plugins/computeengine/ComputeEngineCloud/computerSet.jelly +++ b/src/main/resources/com/google/jenkins/plugins/computeengine/ComputeEngineCloud/computerSet.jelly @@ -12,28 +12,32 @@ License. --> - + + - - - - - - - + + + + + + + + + + + diff --git a/src/main/resources/com/google/jenkins/plugins/computeengine/ComputeEngineCloud/provision.js b/src/main/resources/com/google/jenkins/plugins/computeengine/ComputeEngineCloud/provision.js new file mode 100644 index 00000000..32bc13d9 --- /dev/null +++ b/src/main/resources/com/google/jenkins/plugins/computeengine/ComputeEngineCloud/provision.js @@ -0,0 +1,8 @@ +Behaviour.specify("[data-type='gcloud-provision']", 'gcloud-provision', -99, function(e) { + e.addEventListener("click", function (event) { + const form = document.getElementById(e.dataset.form); + form.querySelector("[name='configuration']").value = e.dataset.url; + buildFormTree(form); + form.submit(); + }); +});