try
parent
3b4d690e14
commit
e938436c7f
|
|
@ -1,23 +1,28 @@
|
|||
properties([parameters([[$class: 'DynamicReferenceParameter', choiceType: 'ET_FORMATTED_HTML', name: 'General', omitValueField: false, randomName: 'choice-parameter-517572555514769', referencedParameters: '', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], oldScript: '', sandbox: false, script: ''], script: [classpath: [], oldScript: '', sandbox: true,
|
||||
script: '''
|
||||
def generator = { String alphabet, int n ->
|
||||
new Random().with {
|
||||
(1..n).collect { alphabet[ nextInt( alphabet.length() ) ] }.join()
|
||||
}
|
||||
}
|
||||
randomValue = generator( (('A'..'Z')+('0'..'9')+('a'..'z')).join(), 9 )
|
||||
|
||||
vappHtml = """
|
||||
try {
|
||||
|
||||
def demoID = new Random().with {(1..15).collect {(('a'..'z')).join('')[ nextInt((('a'..'z')).join('').length())]}.join('')}
|
||||
|
||||
paramHtml = """
|
||||
<script>
|
||||
|
||||
Q("p").text("Hello world!");
|
||||
|
||||
</script>
|
||||
|
||||
<ul style="list-style-type: none">
|
||||
<li style="padding: 5px">
|
||||
<label>${randomValue}</label>
|
||||
<input type="text" class="jenkins-input" name="value">
|
||||
<label>Demo Name (Optional)</label>
|
||||
<input type="text" class="jenkins-input" size="20" name="value"><a>-nttdata</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Demo Url will be: </p>
|
||||
"""
|
||||
}catch(e){ return [e.toString()] }
|
||||
|
||||
return vappHtml
|
||||
return paramHtml
|
||||
|
||||
''']]]])])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue