Skip to content

Commit e9742a8

Browse files
committed
Modernize GUI
Note: Work in Progress for now Matches jenkinsci/kubernetes-plugin#1443 and jenkinsci/azure-vm-agents-plugin#493 - Split agent templates into multiple pages. - Fix several usability issues with validateButtons and other special page elements. - Allow template list to be reordered. - Added proper breadcrumb navigation for the new pages and got rid of sidepanel for those.
1 parent 9e72689 commit e9742a8

39 files changed

+1840
-726
lines changed

pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,19 @@ limitations under the License.
387387
</configuration>
388388
</plugin>
389389

390+
<plugin>
391+
<groupId>com.diffplug.spotless</groupId>
392+
<artifactId>spotless-maven-plugin</artifactId>
393+
<configuration>
394+
<pom>
395+
<includes>
396+
<!-- Don't touch my pom.xml! -->
397+
<include>/dev/null</include>
398+
</includes>
399+
</pom>
400+
</configuration>
401+
</plugin>
402+
390403
</plugins>
391404
</build>
392405

src/main/java/jenkins/plugins/jclouds/blobstore/BlobStoreProfile.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
import org.kohsuke.stapler.AncestorInPath;
6060
import org.kohsuke.stapler.DataBoundConstructor;
6161
import org.kohsuke.stapler.QueryParameter;
62-
import org.kohsuke.stapler.interceptor.RequirePOST;
6362
import org.kohsuke.stapler.verb.POST;
6463

6564
import org.kohsuke.accmod.Restricted;
@@ -323,7 +322,7 @@ public ListBoxModel doFillProviderNameItems(@AncestorInPath ItemGroup context) {
323322
return m;
324323
}
325324

326-
@RequirePOST
325+
@POST
327326
public FormValidation doTestConnection(@QueryParameter("providerName") final String provider,
328327
@QueryParameter("credentialsId") final String credId,
329328
@QueryParameter("endPointUrl") final String url,
@@ -344,7 +343,7 @@ public FormValidation doTestConnection(@QueryParameter("providerName") final Str
344343
return res;
345344
}
346345

347-
@RequirePOST
346+
@POST
348347
public ListBoxModel doFillLocationIdItems(@QueryParameter String providerName,
349348
@QueryParameter String credentialsId,
350349
@QueryParameter String endPointUrl) {
@@ -367,7 +366,7 @@ public ListBoxModel doFillLocationIdItems(@QueryParameter String providerName,
367366
return m;
368367
}
369368

370-
@RequirePOST
369+
@POST
371370
public FormValidation doValidateLocationId(@QueryParameter("providerName") final String provider,
372371
@QueryParameter("credentialsId") final String credId,
373372
@QueryParameter("endPointUrl") final String url,

src/main/java/jenkins/plugins/jclouds/blobstore/BlobStorePublisher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import org.kohsuke.stapler.AncestorInPath;
3636
import org.kohsuke.stapler.DataBoundConstructor;
3737
import org.kohsuke.stapler.StaplerRequest2;
38-
import org.kohsuke.stapler.interceptor.RequirePOST;
38+
import org.kohsuke.stapler.verb.POST;
3939

4040
import org.jclouds.rest.AuthorizationException;
4141

@@ -297,7 +297,7 @@ public boolean isApplicable(Class<? extends AbstractProject> aClass) {
297297
return profiles != null && !profiles.isEmpty();
298298
}
299299

300-
@RequirePOST
300+
@POST
301301
public ListBoxModel doFillProfileNameItems(@AncestorInPath AbstractProject project) {
302302
if (null == project) {
303303
Jenkins.get().checkPermission(Jenkins.ADMINISTER);

src/main/java/jenkins/plugins/jclouds/cli/JCloudsUpdateCloudCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected int run() throws Exception {
8484
tpl.setCloud(nc);
8585
}
8686
if (keep) {
87-
nc.templates.addAll(oc.getTemplates());
87+
nc.setTemplates(oc.getTemplates());
8888
}
8989
Jenkins.get().clouds.replace(oc, nc);
9090
return 0;

src/main/java/jenkins/plugins/jclouds/compute/InstancesToRun.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import org.kohsuke.stapler.AncestorInPath;
3333
import org.kohsuke.stapler.DataBoundConstructor;
3434
import org.kohsuke.stapler.QueryParameter;
35-
import org.kohsuke.stapler.interceptor.RequirePOST;
35+
import org.kohsuke.stapler.verb.POST;
3636

3737
public final class InstancesToRun extends AbstractDescribableImpl<InstancesToRun> implements Serializable {
3838

@@ -81,7 +81,7 @@ public String defaultCloudName() {
8181
return "";
8282
}
8383

84-
@RequirePOST
84+
@POST
8585
public ListBoxModel doFillCloudNameItems(@AncestorInPath AbstractProject project) {
8686
if (null == project) {
8787
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
@@ -100,7 +100,7 @@ public ListBoxModel doFillCloudNameItems(@AncestorInPath AbstractProject project
100100
return m;
101101
}
102102

103-
@RequirePOST
103+
@POST
104104
public ListBoxModel doFillTemplateNameItems(@AncestorInPath AbstractProject project, @QueryParameter("cloudName") String cname) {
105105
if (null == project) {
106106
Jenkins.get().checkPermission(Jenkins.ADMINISTER);

0 commit comments

Comments
 (0)