Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-40440] Computed folder should not redirect to computat…
…ion if not buildable
  • Loading branch information
stephenc committed Dec 14, 2016
1 parent 41f1e2d commit 44abe8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -241,7 +241,7 @@ public void doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOExc
try {
recalculate = Recalculation.UNKNOWN;
super.doConfigSubmit(req, rsp);
if (recalculate != Recalculation.NO_RECALCULATION) {
if (recalculate != Recalculation.NO_RECALCULATION && isBuildable()) {
scheduleBuild();
}
} finally {
Expand Down Expand Up @@ -316,7 +316,7 @@ protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOExceptio
@Override
@Nonnull
protected final String getSuccessfulDestination() {
if (recalculate != Recalculation.NO_RECALCULATION) {
if (recalculate != Recalculation.NO_RECALCULATION && isBuildable()) {
return computation.getSearchUrl() + "console";
} else {
return super.getSuccessfulDestination();
Expand Down
Expand Up @@ -329,9 +329,9 @@ public BallColor getIconColor() {
}
Result previousResult = getPreviousResult();
if (previousResult == null) {
return BallColor.GREY_ANIME;
return isBuilding() ? BallColor.GREY_ANIME : BallColor.GREY;
}
return previousResult.color.anime();
return isBuilding() ? previousResult.color.anime() : previousResult.color;
}

public String getBuildStatusIconClassName() {
Expand Down

0 comments on commit 44abe8e

Please sign in to comment.