Skip to content

Commit

Permalink
TriggerMonitor: Fix grey icon anime bug and modernize icon animation
Browse files Browse the repository at this point in the history
Use the new icon from jenkins build class and drop legacy icon

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
  • Loading branch information
panicking committed Dec 29, 2023
1 parent c563987 commit a23ac1c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,17 @@ void setBuild(Run build) {
@SuppressWarnings("unused") //called from jelly
public String getBallColor() {
if (!triggerScanStarted) {
return BallColor.GREY.getImage();
return BallColor.GREY.getIconClassName();
} else if (!triggerScanDone) {
return BallColor.GREY_ANIME.getImage();
return BallColor.GREY_ANIME.getIconClassName();
} else if (isUnTriggered()) {
return BallColor.DISABLED.getImage();
return BallColor.DISABLED.getIconClassName();
} else {
Result result = getLeastFavorableResult();
if (result != null) {
return result.color.getImage();
return result.color.getIconClassName();
} else {
return BallColor.GREY_ANIME.getImage();
return BallColor.GREY_ANIME.getIconClassName();

Check warning on line 218 in src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/actions/manual/TriggerMonitor.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 208-218 are not covered by tests
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<j:choose>
<j:when test="${other.hasBuild()}">
<td width="18">
<img src="${imagesURL}/16x16/${other.build.iconColor.image}"/>
<l:icon class="${build.build.iconColor.iconClassName}"/>
</td>
<td>
<a href="${rootURL}/${other.project.url}">${other.project.displayName}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<j:forEach items="${monitor.eventsIterator}" var="state">
<tr>
<td width="14">
<img src="${imagesURL}/16x16/${state.ballColor}"/>
<l:icon class="${state.ballColor}" />
</td>
<td colspan="2" style="font-weight: bold;">
<a href="${it.getGerritUrl(state.event)}" target="_new">
Expand All @@ -56,7 +56,7 @@
<j:choose>
<j:when test="${build.hasBuild()}">
<td width="18">
<img src="${imagesURL}/16x16/${build.build.iconColor.image}"/>
<l:icon class="${build.build.iconColor.iconClassName}"/>
</td>
<td>
<a href="${rootURL}/${build.project.url}">${build.project.displayName}</a>
Expand All @@ -67,7 +67,7 @@
</j:when>
<j:otherwise>
<td width="14">
<img src="${rootURL}/images/build-status/build-status-sprite.svg#never-built" class="icon-grey-anime icon-sm"/>
<l:icon class="icon-grey-anime icon-sm"/>
</td>
<td>
<a href="${rootURL}/${build.project.url}">${build.project.displayName}</a>
Expand Down

0 comments on commit a23ac1c

Please sign in to comment.