提交 f11aa8dd 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #2962 from oleg-nenashev/bug/JENKINS-45895

[FIXED JENKINS-45895] - JNLPLauncher config.jelly should not display Work Dir settings when included from other class
......@@ -163,6 +163,22 @@ public class JNLPLauncher extends ComputerLauncher {
public String getDisplayName() {
return Messages.JNLPLauncher_displayName();
}
/**
* Checks if Work Dir settings should be displayed.
*
* This flag is checked in {@code config.jelly} before displaying the
* {@link JNLPLauncher#workDirSettings} property.
* By default the configuration is displayed only for {@link JNLPLauncher},
* but the implementation can be overridden.
* @return {@code true} if work directories are supported by the launcher type.
* @since TODO
*/
public boolean isWorkDirSupported() {
// This property is included only for JNLPLauncher by default.
// Causes JENKINS-45895 in the case of includes otherwise
return DescriptorImpl.class.equals(getClass());
}
};
/**
......
......@@ -24,7 +24,10 @@ THE SOFTWARE.
<?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">
<f:property title="${%Enable work directory}" field="workDirSettings" />
<!-- This property is included only if used directly. Causes JENKINS-45895 in the case of includes otherwise -->
<j:if test="${descriptor.workDirSupported}">
<f:property title="${%Enable work directory}" field="workDirSettings" />
</j:if>
<f:advanced>
<f:entry title="${%Tunnel connection through}" help="/help/system-config/master-slave/jnlp-tunnel.html">
<f:textbox field="tunnel"/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册