From cc6b299701455e0a8abdfae6ac1cb77593c9ea7e Mon Sep 17 00:00:00 2001 From: Zbynek Konecny Date: Fri, 25 Oct 2024 23:13:32 +0200 Subject: [PATCH 1/3] Replace dropdown button to remove dependency on YUI --- pom.xml | 6 ++-- .../plugins/ec2/EC2Cloud/computerSet.jelly | 34 ++++++++++--------- .../hudson/plugins/ec2/EC2Cloud/provision.js | 8 +++++ 3 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js diff --git a/pom.xml b/pom.xml index 2e02b6b9e..3b6068c08 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ THE SOFTWARE. 999999-SNAPSHOT - 2.414.3 + 2.452.3 jenkinsci/${project.artifactId}-plugin 1626 @@ -201,8 +201,8 @@ THE SOFTWARE. io.jenkins.tools.bom - bom-2.414.x - 2982.vdce2153031a_0 + bom-2.452.x + 3208.vb_21177d4b_cd9 import pom diff --git a/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly b/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly index b8f540ab2..1f9a89863 100644 --- a/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly +++ b/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly @@ -22,28 +22,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> - + + + + + + + + - - - - - + + diff --git a/src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js b/src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js new file mode 100644 index 000000000..0c60f02ea --- /dev/null +++ b/src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js @@ -0,0 +1,8 @@ +Behaviour.specify("[data-type='ec2-provision']", 'ec2-provision', -99, function(e) { + e.addEventListener("click", function (event) { + const form = document.querySelector("form[name='provision']"); + form.querySelector("[name='template']").value = e.dataset.url; + buildFormTree(form); + form.submit(); + }); +}); \ No newline at end of file From 6faa35ae6658b8d256a5cf6440a7c975b39cabe4 Mon Sep 17 00:00:00 2001 From: Zbynek Konecny Date: Sat, 26 Oct 2024 15:19:52 +0200 Subject: [PATCH 2/3] Fix cell width for provision row --- .../resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly b/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly index 1f9a89863..b5664389c 100644 --- a/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly +++ b/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly @@ -27,7 +27,7 @@ THE SOFTWARE. - + Date: Sun, 27 Oct 2024 13:22:20 +0100 Subject: [PATCH 3/3] Use unique ID for forms --- .../resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly | 4 +++- src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly b/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly index b5664389c..54c968f11 100644 --- a/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly +++ b/src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly @@ -25,6 +25,7 @@ THE SOFTWARE. + @@ -36,13 +37,14 @@ THE SOFTWARE. - + diff --git a/src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js b/src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js index 0c60f02ea..82e1459e0 100644 --- a/src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js +++ b/src/main/resources/hudson/plugins/ec2/EC2Cloud/provision.js @@ -1,6 +1,6 @@ Behaviour.specify("[data-type='ec2-provision']", 'ec2-provision', -99, function(e) { e.addEventListener("click", function (event) { - const form = document.querySelector("form[name='provision']"); + const form = document.getElementById(e.dataset.form); form.querySelector("[name='template']").value = e.dataset.url; buildFormTree(form); form.submit();