Use `f:dropdownDescriptorSelector` for agent launcher (#11055)

This commit is contained in:
Jesse Glick 2025-09-17 10:10:16 -04:00 committed by GitHub
parent 863a8a46b6
commit 69e44255b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 24 deletions

View File

@ -27,15 +27,6 @@ THE SOFTWARE.
<l:ajax> <l:ajax>
<div> <div>
${%Controls how Jenkins starts this agent.} ${%Controls how Jenkins starts this agent.}
<dl>
<j:forEach var="d" items="${h.getComputerLauncherDescriptors()}">
<dt><b>${d.displayName}</b></dt>
<dd>
<st:include class="${d.clazz}" page="help.jelly" optional="true"/>
</dd>
</j:forEach>
</dl>
</div> </div>
</l:ajax> </l:ajax>
</j:jelly> </j:jelly>

View File

@ -49,21 +49,8 @@ THE SOFTWARE.
<f:slave-mode name="mode" node="${it}" /> <f:slave-mode name="mode" node="${it}" />
<!-- TODO: should be packaged as a tag --> <!-- TODO: should be packaged as a tag -->
<j:set var="itDescriptor" value="${descriptor}"/> <j:set var="computerLauncherDescriptors" value="${descriptor.computerLauncherDescriptors(it)}"/>
<f:dropdownList name="slave.launcher" title="${%Launch method}" <f:dropdownDescriptorSelector title="${%Launch method}" field="launcher" descriptors="${computerLauncherDescriptors}"/>
help="${descriptor.getHelpFile('launcher')}">
<j:forEach var="d" items="${descriptor.computerLauncherDescriptors(it)}">
<f:dropdownListBlock value="${d.clazz.name}" name="${d.displayName}"
selected="${it.launcher.descriptor==d}"
title="${d.displayName}">
<j:set var="descriptor" value="${d}"/>
<j:set var="instance"
value="${it.launcher.descriptor==d ? it.launcher : null}"/>
<f:class-entry descriptor="${d}" />
<st:include from="${d}" page="${d.configPage}" optional="true"/>
</f:dropdownListBlock>
</j:forEach>
</f:dropdownList>
<!-- pointless to show this if there's only one option, which is the default --> <!-- pointless to show this if there's only one option, which is the default -->
<j:set var="retentionStrategies" value="${descriptor.retentionStrategyDescriptors(it)}"/> <j:set var="retentionStrategies" value="${descriptor.retentionStrategyDescriptors(it)}"/>