Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move configuration to appearance page #109

Merged
merged 8 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<properties>
<revision>1.29.0-7</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.420-rc34099.3e12ca_2a_ea_90</jenkins.version>
timja marked this conversation as resolved.
Show resolved Hide resolved

<module.name>${project.groupId}.prism</module.name>
timja marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
11 changes: 10 additions & 1 deletion src/main/java/io/jenkins/plugins/prism/PrismConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.jenkins.plugins.prism;

import edu.umd.cs.findbugs.annotations.NonNull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand All @@ -9,6 +10,8 @@
import edu.hm.hafner.util.PathUtil;
import edu.hm.hafner.util.VisibleForTesting;

import jenkins.appearance.AppearanceCategory;
import jenkins.model.GlobalConfigurationCategory;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.verb.POST;
import org.jenkinsci.Symbol;
Expand Down Expand Up @@ -46,7 +49,7 @@
* @author Ullrich Hafner
*/
@Extension
@Symbol("prismConfiguration")
@Symbol("prism")
@SuppressWarnings("PMD.DataClass")
public class PrismConfiguration extends GlobalConfigurationItem {
private static final PathUtil PATH_UTIL = new PathUtil();
Expand Down Expand Up @@ -77,6 +80,12 @@ public PrismConfiguration() {
load();
}

@NonNull
@Override
public GlobalConfigurationCategory getCategory() {
return GlobalConfigurationCategory.get(AppearanceCategory.class);
}

@Override
protected void clearRepeatableProperties() {
setSourceDirectories(new ArrayList<>());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
unclassified:
prismConfiguration:
appearance:
prism:
sourceDirectories:
- path: "C:\\Windows"
- path: "/absolute"
4 changes: 2 additions & 2 deletions src/test/resources/io/jenkins/plugins/prism/theme.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
unclassified:
prismConfiguration:
appearance:
prism:
theme: "DARK"