Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-26093] Look up the downstream parameter definitions and show…
… their index pages. Originally-Committed-As: 276eee3b7d552e031b73d440a2faf29d25dbc680
- Loading branch information
Showing
3 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ci/plugins/workflow/support/steps/build/BuildTriggerStep/DescriptorImpl/parameters.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerStep; | ||
def st = namespace('jelly:stapler') | ||
def l = namespace('/lib/layout') | ||
l.ajax { | ||
def jobName = request.getParameter('job') | ||
if (jobName != null) { | ||
def job = app.getItemByFullName(jobName, hudson.model.Job) | ||
if (job != null) { | ||
def pdp = job.getProperty(hudson.model.ParametersDefinitionProperty) | ||
if (pdp != null) { | ||
table(width: '100%', class: 'parameters') { | ||
for (parameterDefinition in pdp.parameterDefinitions) { | ||
tbody { | ||
st.include(it: parameterDefinition, page: parameterDefinition.descriptor.valuePage) | ||
} | ||
} | ||
} | ||
} else { | ||
text("${job.fullDisplayName} is not parameterized") | ||
} | ||
} else { | ||
text("no such job ${jobName}") | ||
} | ||
} else { | ||
text('no job specified') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters