Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 9d7d097

Browse files
committed
Added Post action for Query parameters
1 parent de1e264 commit 9d7d097

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/main/java/com/mathworks/ci/MatlabBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import jenkins.model.Jenkins;
4444
import jenkins.tasks.SimpleBuildStep;
4545
import net.sf.json.JSONObject;
46+
import org.kohsuke.stapler.verb.POST;
4647

4748
public class MatlabBuilder extends Builder implements SimpleBuildStep {
4849

@@ -148,7 +149,7 @@ public DescriptorExtensionList<TestRunTypeList, Descriptor<TestRunTypeList>> get
148149
* descriptor class.
149150
*/
150151

151-
152+
@POST
152153
public FormValidation doCheckMatlabRoot(@QueryParameter String matlabRoot) {
153154
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
154155
setMatlabRoot(matlabRoot);

src/main/java/com/mathworks/ci/UseMatlabVersionBuildWrapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import hudson.tasks.BuildWrapperDescriptor;
3333
import hudson.util.FormValidation;
3434
import jenkins.tasks.SimpleBuildWrapper;
35+
import org.kohsuke.stapler.verb.POST;
3536

3637
public class UseMatlabVersionBuildWrapper extends SimpleBuildWrapper {
3738

@@ -138,7 +139,7 @@ public String getMatlabAxisWarning() {
138139
* these methods are used to perform basic validation on UI elements associated with this
139140
* descriptor class.
140141
*/
141-
142+
@POST
142143
public FormValidation doCheckMatlabRootFolder(@QueryParameter String matlabRootFolder) {
143144
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
144145
List<Function<String, FormValidation>> listOfCheckMethods =

src/main/resources/com/mathworks/ci/MatlabBuilder/config.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<font color="red">Using this build step is not recommended and will be removed in a feature release. Use “Run MATLAB Tests” or “Run MATLAB Command” instead.</font>
55
<f:section>
66
<f:entry title="MATLAB root " field="matlabRoot">
7-
<f:textbox disabled="disabled"/>
7+
<f:textbox disabled="disabled" checkMethod="post" />
88
</f:entry>
99
</f:section>
1010
<f:dropdownDescriptorSelector title="Test mode" field="testRunTypeList" descriptors="${descriptor.testRunTypeDescriptor}" selected="${instance.testRunTypeList}" disabled="true"/>

src/main/resources/com/mathworks/ci/UseMatlabVersionBuildWrapper/config.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<j:choose>
1919
<j:when test="${loop.last}">
2020
<f:entry title="MATLAB root: " field="matlabRootFolder">
21-
<f:textbox/>
21+
<f:textbox checkMethod="post"/>
2222
</f:entry>
2323
</j:when>
2424
</j:choose>

0 commit comments

Comments
 (0)