diff --git a/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep/config.jelly b/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep/config.jelly index 54c1909f..67475521 100644 --- a/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep/config.jelly +++ b/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep/config.jelly @@ -44,19 +44,7 @@ THE SOFTWARE.
diff --git a/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep/config.js b/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep/config.js new file mode 100644 index 00000000..86df74b4 --- /dev/null +++ b/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep/config.js @@ -0,0 +1,13 @@ +function loadParams() { + var div = document.getElementById('params'); + fetch('${descriptor.descriptorUrl}/parameters?job=' + encodeURIComponent(document.getElementById('${jobFieldId}').value) + '&context=${descriptor.contextEncoded}').then((rsp) => { + rsp.text().then((responseText) => { + if (rsp.ok) { + div.innerHTML = responseText; + Behaviour.applySubtree(div); + } else { + div.innerHTML = "ERROR: Failed to load parameter definitions: " + rsp.statusText; + } + }); + }); +} \ No newline at end of file