Skip to content
Permalink
Browse files

add ability to choose green color for successful builds

( JENKINS-14895 + JENKINS-12132 )
  • Loading branch information
nikom committed Dec 30, 2012
1 parent cb2c550 commit 91e8c7961078a2ba5d3c2560bf8f836334b4b370
@@ -92,6 +92,8 @@

private Boolean showClaimInfoInUnstable = true;

private Boolean showGreenColor = false;

private transient List<XFPanelEntry> entries;

private transient Map<hudson.model.Queue.Item, Integer> placeInQueue = new HashMap<hudson.model.Queue.Item, Integer>();
@@ -119,10 +121,19 @@ public XFPanelView(String name, Integer numColumns) {
* @return the colors to use
*/
public XFColors getColors() {
if (this.colors == null) {
this.colors = XFColors.DEFAULT;

if (getShowGreenColor() == true) {
if (this.colors == null) {
this.colors = XFColors.GREEN;
}
return this.colors;
}
else {
if (this.colors == null) {
this.colors = XFColors.DEFAULT;
}
return this.colors;
}
return this.colors;
}

public Integer getGuiHeight() {
@@ -193,11 +204,18 @@ public Boolean getShowDescription() {

public Boolean getShowBrokenBuildCount() {
if (this.showBrokenBuildCount == null) {
this.showBrokenBuildCount = false;
this.showBrokenBuildCount = Boolean.FALSE;;
}
return this.showBrokenBuildCount;
}

public Boolean getShowGreenColor(){
if (this.showGreenColor == null) {
this.showGreenColor = Boolean.FALSE;
}
return this.showGreenColor;
}

public Boolean getSortDescending() {
if (this.sortDescending == null) {
this.sortDescending = Boolean.FALSE;
@@ -382,6 +400,7 @@ protected void submit(StaplerRequest req) throws ServletException, FormException
this.autoResizeEntryHeight = Boolean.parseBoolean(req.getParameter("autoResizeEntryHeight"));
this.hideSuccessfulBuilds = Boolean.parseBoolean(req.getParameter("hideSuccessfulBuilds"));
this.showBrokenBuildCount = Boolean.parseBoolean(req.getParameter("showBrokenBuildCount"));
this.showGreenColor = Boolean.parseBoolean(req.getParameter("showGreenColor"));

if ( getIsClaimPluginInstalled() ){
this.guiClaimFont = asInteger(req, "guiClaimFont");
@@ -1181,7 +1200,18 @@ public String getOtherFG() {

public static final XFColors DEFAULT =
new XFColors("#7E7EFF", "#FFFFFF", "#FFC130", "#FFFFFF", "#FF0000", "#FFFFFF", "#CCCCCC", "#FFFFFF");

/*
* okBG , okFG , failedBG , failedFG , brokenBG , brokenFG , otherBG ,
* otherFG FFFFFF = white FF0000 = red 7E7EFF = blue FFC130 = yellow
* 215E21 = huntergreen #267526 = another green
*/
public static final XFColors GREEN = new XFColors("#267526", "#FFFFFF",
"#FFC130", "#FFFFFF", "#FF0000", "#FFFFFF", "#CCCCCC",
"#FFFFFF");

}


}

@@ -65,6 +65,10 @@
<f:entry title="${%Hide successful builds}" field="hideSuccessfulBuilds">
<f:checkbox id="xfpanel.hideSuccessfulBuilds" name="hideSuccessfulBuilds" checked="${it.hideSuccessfulBuilds}" value="true"/>
</f:entry>
<f:entry title="${%Use green color for successful build}" field="showGreenColor">
<f:checkbox id="xfpanel.showGreenColor" name="showGreenColor" checked="${it.showGreenColor}" value="true" />
</f:entry>


<td colspan="3" style="font-weight:bold;" >Build responsibles <hr /> </td>
<f:entry title="${%Show Responsibles}" field="responsibles">

0 comments on commit 91e8c79

Please sign in to comment.
You can’t perform that action at this time.