diff --git a/src/main/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn.java b/src/main/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn.java index 7ec5ccd8..5daf6ac8 100644 --- a/src/main/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn.java +++ b/src/main/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn.java @@ -34,7 +34,7 @@ public List getPromotionIcons(final Item item) { for (Status s : a.getPromotions()) { PromotionProcess process = s.getProcess(); if (process !=null && process.isVisible()){ - icons.add(s.getIcon("16px")); + icons.add(s.getIcon()); } } } diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java b/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java index b85576d0..0f0e5262 100644 --- a/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java +++ b/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java @@ -79,8 +79,8 @@ public final class PromotionProcess extends AbstractProject(this); /** * The icon that represents this promotion process. This is the name of - * the GIF icon that can be found in ${rootURL}/plugin/promoted-builds/icons/16x16/ - * and ${rootURL}/plugin/promoted-builds/icons/32x32/, e.g. "star-gold". + * the SVG icon that can be found in ${rootURL}/plugin/promoted-builds/icons/, + * e.g. "star-gold". */ public String icon; diff --git a/src/main/java/hudson/plugins/promoted_builds/Status.java b/src/main/java/hudson/plugins/promoted_builds/Status.java index 62f82c9e..9b5364cf 100644 --- a/src/main/java/hudson/plugins/promoted_builds/Status.java +++ b/src/main/java/hudson/plugins/promoted_builds/Status.java @@ -116,11 +116,10 @@ public PromotionProcess getProcess() { /** * Gets the icon that should represent this promotion (that is potentially attempted but failed.) - * @param size size of the icon, will be used in the icon path - * @return Path to the icon in resources + * @return Path to the SVG icon in resources or l:icon class name */ @NonNull - public String getIcon(String size) { + public String getIcon() { String baseName; PromotionProcess p = getProcess(); @@ -130,7 +129,7 @@ public String getIcon(String size) { } else { Promotion l = getLast(); if (l!=null && l.getResult()!= Result.SUCCESS) { - return Jenkins.RESOURCE_PATH+"/images/"+size+"/error.png"; + return "icon-red"; } baseName = p.getIcon(); } diff --git a/src/main/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcess.java b/src/main/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcess.java index dbd5a427..2f61f4e0 100755 --- a/src/main/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcess.java +++ b/src/main/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcess.java @@ -19,8 +19,8 @@ public final class JobDslPromotionProcess { private String name; /** * The icon that represents this promotion process. This is the name of - * the GIF icon that can be found in ${rootURL}/plugin/promoted-builds/icons/16x16/ - * and ${rootURL}/plugin/promoted-builds/icons/32x32/, e.g. "star-gold". + * the SVG icon that can be found in ${rootURL}/plugin/promoted-builds/icons/, + * e.g. "star-gold". */ private String icon; diff --git a/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/column.jelly b/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/column.jelly index 16e6f61c..79053e29 100644 --- a/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/column.jelly +++ b/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/column.jelly @@ -1,8 +1,15 @@ - + - + + + + + + + + diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly b/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly index 49b9ff17..673f0c22 100644 --- a/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly +++ b/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly @@ -1,13 +1,20 @@ - + - - - + + + + + + + + + +