Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from jenkinsci/feature/JENKINS-39366
JENKINS-39366
- Loading branch information
Showing
4 changed files
with
60 additions
and
36 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
15 changes: 15 additions & 0 deletions
15
src/main/java/net/uaznia/lukanus/hudson/plugins/gitparameter/GitParameterRebuild.java
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,15 @@ | ||
package net.uaznia.lukanus.hudson.plugins.gitparameter; | ||
|
||
import com.sonyericsson.rebuild.RebuildParameterPage; | ||
import com.sonyericsson.rebuild.RebuildParameterProvider; | ||
import hudson.Extension; | ||
import hudson.model.ParameterValue; | ||
|
||
@Extension(optional = true) | ||
public class GitParameterRebuild extends RebuildParameterProvider { | ||
|
||
@Override | ||
public RebuildParameterPage getRebuildPage(ParameterValue parameterValue) { | ||
return new RebuildParameterPage(GitParameterValue.class,"value.jelly"); | ||
} | ||
} |
58 changes: 29 additions & 29 deletions
58
...sources/net/uaznia/lukanus/hudson/plugins/gitparameter/GitParameterDefinition/index.jelly
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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" | ||
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" | ||
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project"> | ||
<st:adjunct includes="org.kohsuke.stapler.jquery"/> | ||
<st:adjunct includes="net.uaznia.lukanus.hudson.plugins.gitparameter.script"/> | ||
<j:set var="divId" value="${it.divUUID}" scope="parent"/> | ||
<f:entry title="${it.name}" description="${it.description}"> | ||
<div name="parameter" description="${it.description}" id="${divId}"> | ||
<st:adjunct includes="lib.form.select.select"/> | ||
<input type="hidden" name="name" value="${it.name}"/> | ||
<select name="value" class="select" size="5" style="min-width: 200px" id="select" | ||
fillUrl="${h.getCurrentDescriptorByNameUrl()}/${it.descriptor.descriptorUrl}/fillValueItems?param=${it.name}"> | ||
<option value="">${%retrieving.references}</option> | ||
</select> | ||
<j:if test="${it.quickFilterEnabled}"> | ||
<input class='git_parameter_quick_filter' type='text' value='' name='quickFilter' placeholder='Filter' | ||
style="vertical-align: top" id="filter"/> | ||
</j:if> | ||
<script type="text/javascript"> | ||
var parentDiv = jQuery('#${divId}'); | ||
new GitParameter.QuickFilter(parentDiv.find('.select').get(0), | ||
parentDiv.find('.git_parameter_quick_filter').get(0), | ||
"${it.selectedValue}", "${it.defaultValue}"); | ||
</script> | ||
</div> | ||
<div>${%needs.to.clone}</div> | ||
</f:entry> | ||
</j:jelly> | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" | ||
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" | ||
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project"> | ||
<st:adjunct includes="org.kohsuke.stapler.jquery"/> | ||
<st:adjunct includes="net.uaznia.lukanus.hudson.plugins.gitparameter.script"/> | ||
<j:set var="divId" value="${it.divUUID}" scope="parent"/> | ||
<f:entry title="${it.name}" description="${it.description}"> | ||
<div name="parameter" description="${it.description}" id="${divId}"> | ||
<st:adjunct includes="lib.form.select.select"/> | ||
<input type="hidden" name="name" value="${it.name}"/> | ||
<select name="value" class="select" size="5" style="min-width: 200px" id="select" | ||
fillUrl="${h.getCurrentDescriptorByNameUrl()}/${it.descriptor.descriptorUrl}/fillValueItems?param=${it.name}"> | ||
<option value="">${%retrieving.references}</option> | ||
</select> | ||
<j:if test="${it.quickFilterEnabled}"> | ||
<input class='git_parameter_quick_filter' type='text' value='' name='quickFilter' placeholder='Filter' | ||
style="vertical-align: top" id="filter"/> | ||
</j:if> | ||
<script type="text/javascript"> | ||
var parentDiv = jQuery('#${divId}'); | ||
new GitParameter.QuickFilter(parentDiv.find('.select').get(0), | ||
parentDiv.find('.git_parameter_quick_filter').get(0), | ||
"${it.selectedValue}", "${it.defaultValue}"); | ||
</script> | ||
</div> | ||
<div>${%needs.to.clone}</div> | ||
</f:entry> | ||
</j:jelly> |
17 changes: 10 additions & 7 deletions
17
...in/resources/net/uaznia/lukanus/hudson/plugins/gitparameter/GitParameterValue/value.jelly
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" | ||
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" | ||
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project"> | ||
<f:entry title="${it.name}" description="${it.description}"> | ||
${it.value} | ||
</f:entry> | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" | ||
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" | ||
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project"> | ||
<f:entry title="${it.name}" description="${it.description}"> | ||
<div name="parameter" description="${it.description}"> | ||
<input type="hidden" name="name" value="${it.name}" /> | ||
<f:textbox name="value" value="${it.value}" /> | ||
</div> | ||
</f:entry> | ||
</j:jelly> |