Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[FIXED JENKINS-21510] Use context path for ball images.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Jan 29, 2014
1 parent f336ee3 commit 0526edc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/hudson/plugins/analysis/core/BuildResult.java
Expand Up @@ -18,6 +18,7 @@
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.Exported;
Expand Down Expand Up @@ -1398,7 +1399,8 @@ private String getReferenceBuildUrl() {
* @return the icon for the build result
*/
public String getResultIcon() {
String message = "<img src=\"" + Jenkins.RESOURCE_PATH + "/images/16x16/%s\" alt=\"%s\" title=\"%s\"/>";
String message = "<img src=\"" + Stapler.getCurrentRequest().getContextPath() + Jenkins.RESOURCE_PATH
+ "/images/16x16/%s\" alt=\"%s\" title=\"%s\"/>";
if (pluginResult == Result.FAILURE) {
return String.format(message, FAILED,
hudson.model.Messages.BallColor_Failed(), hudson.model.Messages.BallColor_Failed());
Expand Down

0 comments on commit 0526edc

Please sign in to comment.