Skip to content

Commit

Permalink
Replace PNG icons with shields.io-style SVG icons
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed May 16, 2014
1 parent e9ced64 commit be474fa
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/jenkinsci/plugins/badge/ImageResolver.java
Expand Up @@ -33,11 +33,11 @@ public class ImageResolver {

public ImageResolver() throws IOException{
images = new StatusImage[] {
new StatusImage("failure.png"),
new StatusImage("unstable.png"),
new StatusImage("success.png"),
new StatusImage("running.png"),
new StatusImage("unknown.png")
new StatusImage("build-failure-red.svg"),
new StatusImage("build-unstable-yellow.svg"),
new StatusImage("build-passing-brightgreen.svg"),
new StatusImage("build-running-blue.svg"),
new StatusImage("build-unknown-lightgrey.svg")
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jenkinsci/plugins/badge/StatusImage.java
Expand Up @@ -65,7 +65,7 @@ public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object nod
rsp.setHeader("ETag",etag);
rsp.setHeader("Expires","Fri, 01 Jan 1984 00:00:00 GMT");
rsp.setHeader("Cache-Control", "no-cache, private");
rsp.setHeader("Content-Type", "image/png");
rsp.setHeader("Content-Type", "image/svg+xml;charset=utf-8");
rsp.setHeader("Content-Length", length);
rsp.getOutputStream().write(payload);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/status/build-failing-red.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/webapp/status/build-passing-brightgreen.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/webapp/status/build-running-blue.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/webapp/status/build-unknown-lightgrey.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/webapp/status/build-unstable-yellow.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/webapp/status/failure.png
Binary file not shown.
Binary file removed src/main/webapp/status/running.png
Binary file not shown.
Binary file removed src/main/webapp/status/success.png
Binary file not shown.
Binary file removed src/main/webapp/status/unknown.png
Binary file not shown.
Binary file removed src/main/webapp/status/unstable.png
Binary file not shown.

0 comments on commit be474fa

Please sign in to comment.