Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Show unstable builds as yellow.
This is based on pull requests 2 & 7.
Unstable builds both with and without failing tests appear as yellow.
One issue with the current implementation is that builds that are unstable
due to being marked that way (with no failing tests) aren't enlarged as
broken jobs are.
[FIXED JENKINS-9772]
[FIXED JENKINS-10585]
[FIXED JENKINS-10614]
[FIXED JENKINS-10846]
Loading branch information
@@ -98,14 +98,17 @@ public String getBackgroundColor() {
}
public String getStatus () {
if (getBroken() || getFailCount() > 0 )
if (! StringUtils . isEmpty(getClaim())
&& ! getClaim(). equals(NOT_CLAIMED + " ." ))
return " claimed" ;
else
return " failing" ;
else
if (getStable()) {
return " successful" ;
}
if (! StringUtils . isEmpty(getClaim())
&& ! getClaim(). equals(NOT_CLAIMED + " ." )) {
return " claimed" ;
}
if (getBroken()) {
return " failing" ;
}
return " unstable" ;
}
/*
@@ -62,15 +62,15 @@ public ProjectViewEntry() {
}
public TreeSet<IViewEntry > getUnclaimedJobs () {
TreeSet<IViewEntry > failing = new TreeSet<IViewEntry > (
TreeSet<IViewEntry > unclaimed = new TreeSet<IViewEntry > (
new EntryComparator ());
for (IViewEntry job : jobs) {
if ((job. getBroken() || job. getFailCount() > 0 ) ) {
if ((! job. getStable()) || job. getFailCount() > 0 ) {
if (! job. isClaimed())
failing . add(job);
unclaimed . add(job);
}
}
return failing ;
return unclaimed ;
}
public TreeSet<IViewEntry > getJobs () {
@@ -85,16 +85,18 @@ public void addBuild(IViewEntry entry) {
Validate . notNull(entry);
jobs. add(entry);
}
public String getStatus ()
{
if (getBroken() || getFailCount() > 0 )
if (getUnclaimedJobs(). size() == 0 )
return " claimed" ;
else
return " failing" ;
else
public String getStatus () {
if (getStable()) {
return " successful" ;
}
if (getUnclaimedJobs(). size() == 0 ) {
return " claimed" ;
}
if (getBroken()) {
return " failing" ;
}
return " unstable" ;
}
public String getBackgroundColor () {
@@ -194,8 +196,11 @@ public Boolean getQueued() {
}
public boolean getStable () {
// TODO Auto-generated method stub
return false ;
boolean stable = true ;
for (IViewEntry job : jobs) {
stable &= job. getStable();
}
return stable;
}
public int getSuccessCount () {
@@ -31,11 +31,11 @@
<j : if test =" ${job.broken == false}" >
<j : if test =" ${job.failCount == 1}" >
<font
style=" text-align=center; color: #FFFF00 ; font-size: ${failFont}; font-weight:bold;" >1/${job.testCount} test failure</font >
style=" text-align=center; color: #000000 ; font-size: ${failFont}; font-weight:bold;" >1/${job.testCount} test failure</font >
</j : if >
<j : if test =" ${ job.failCount > 1}" >
<font
style=" text-align=center; color: #FFFF00 ; font-size: ${failFont}; font-weight:bold;" >${job.failCount}/${job.testCount} test failures</font >
style=" text-align=center; color: #000000 ; font-size: ${failFont}; font-weight:bold;" >${job.failCount}/${job.testCount} test failures</font >
</j : if >
<j : if test =" ${job.diff != ''}" >
(
@@ -173,6 +173,20 @@
);
}
.unstable {
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.6, rgb(224,224,0)),
color-stop(0.9, yellow)
);
background-image: -moz-linear-gradient(
center bottom,
rgb(224,224,0) 60%,
yellow 90%
);
}
</style >
<j : choose >
Toggle all file notes