private static final Font FONT = new Font("Verdana", Font.PLAIN, 11);
private static final int MARGIN = 6;
+ private static final int ICON_WIDTH = 20;
- private static final String PARAMETER_MARGIN = "margin";
+ private static final String PARAMETER_ICON_WIDTH_PLUS_MARGIN = "iconWidthPlusMargin";
private static final String PARAMETER_TOTAL_WIDTH = "totalWidth";
private static final String PARAMETER_LABEL_WIDTH = "labelWidth";
- private static final String PARAMETER_LABEL_WIDTH_PLUS_MARGIN = "LabelWidthPlusMargin";
+ private static final String PARAMETER_LABEL_WIDTH_PLUS_MARGIN = "labelWidthPlusMargin";
private static final String PARAMETER_VALUE_WIDTH = "valueWidth";
private static final String PARAMETER_COLOR = "color";
private static final String PARAMETER_LABEL = "label";
int valueWidth = computeWidth(value);
Map<String, String> values = ImmutableMap.<String, String>builder()
- .put(PARAMETER_MARGIN, valueOf(MARGIN))
- .put(PARAMETER_TOTAL_WIDTH, valueOf(MARGIN * 4 + labelWidth + valueWidth))
- .put(PARAMETER_LABEL_WIDTH, valueOf(MARGIN * 2 + labelWidth))
- .put(PARAMETER_LABEL_WIDTH_PLUS_MARGIN, valueOf(MARGIN * 3 + labelWidth))
+ .put(PARAMETER_ICON_WIDTH_PLUS_MARGIN, valueOf(MARGIN + ICON_WIDTH))
+ .put(PARAMETER_TOTAL_WIDTH, valueOf(MARGIN * 4 + ICON_WIDTH + labelWidth + valueWidth))
+ .put(PARAMETER_LABEL_WIDTH, valueOf(MARGIN * 2 + ICON_WIDTH + labelWidth))
+ .put(PARAMETER_LABEL_WIDTH_PLUS_MARGIN, valueOf( MARGIN * 3 + ICON_WIDTH + labelWidth))
.put(PARAMETER_VALUE_WIDTH, valueOf(MARGIN * 2 + valueWidth))
.put(PARAMETER_COLOR, backgroundValueColor.getValue())
.put(PARAMETER_LABEL, label)
-<svg xmlns="http://www.w3.org/2000/svg" height="20" width="127">
+<svg xmlns="http://www.w3.org/2000/svg" height="20" width="147">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="a">
- <rect width="127" height="20" rx="3" fill="#fff"/>
+ <rect width="147" height="20" rx="3" fill="#fff"/>
</clipPath>
<g clip-path="url(#a)">
- <rect fill="#555" height="20" width="77"/>
- <rect fill="#4c1" height="20" width="50" x="77"/>
- <rect fill="url(#b)" height="20" width="127"/>
+ <rect fill="#555" height="20" width="97"/>
+ <rect fill="#4c1" height="20" width="50" x="97"/>
+ <rect fill="url(#b)" height="20" width="147"/>
</g>
<g fill="#fff" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11" text-anchor="left">
- <text x="6" y="15" fill="#010101" fill-opacity=".3">quality gate</text>
- <text x="6" y="14">quality gate</text>
- <text x="83" y="15" fill="#010101" fill-opacity=".3">passed</text>
- <text x="83" y="14">passed</text>
+ <text x="26" y="15" fill="#010101" fill-opacity=".3">quality gate</text>
+ <text x="26" y="14">quality gate</text>
+ <text x="103" y="15" fill="#010101" fill-opacity=".3">passed</text>
+ <text x="103" y="14">passed</text>
</g>
+ <path fill="#010101" fill-opacity=".3" d="M19.58682 9.81722A3.78893 3.78893 0 0 0 17.78048 8.603v-.04378a3.77165 3.77165 0 1 0-7.5433 0v.05069a3.77165 3.77165 0 1 0 3.78317 6.28186 3.7705 3.7705 0 0 0 5.56416-5.0688zm-2.91802 5.21164a2.8247 2.8247 0 0 1-2.8224-2.82124.47463.47463 0 0 0-.94925 0 3.7486 3.7486 0 0 0 .53223 1.9296 2.8201 2.8201 0 1 1-1.08058-4.57805h.01152a1.3202 1.3202 0 0 1 .30758.14745.4747.4747 0 0 0 .61748-.72115 2.1266 2.1266 0 0 0-.61402-.32371 3.75898 3.75898 0 0 0-1.29946-.2304h-.182a2.82125 2.82125 0 1 1 4.45478 2.4192.47462.47462 0 1 0 .55066.773 3.78317 3.78317 0 0 0 1.44806-2.0736 2.8224 2.8224 0 0 1-.97574 5.46969z"/>
+ <path fill="#f3702a" d="M19.58682 9.09722A3.78893 3.78893 0 0 0 17.78048 7.883v-.04378a3.77165 3.77165 0 1 0-7.5433 0v.05069a3.77165 3.77165 0 1 0 3.78317 6.28186 3.7705 3.7705 0 0 0 5.56416-5.0688zm-2.91802 5.21164a2.8247 2.8247 0 0 1-2.8224-2.82124.47463.47463 0 0 0-.94925 0 3.7486 3.7486 0 0 0 .53223 1.9296 2.8201 2.8201 0 1 1-1.08058-4.57805h.01152a1.3202 1.3202 0 0 1 .30758.14745.4747.4747 0 0 0 .61748-.72115 2.1266 2.1266 0 0 0-.61402-.32371 3.75898 3.75898 0 0 0-1.29946-.2304h-.182a2.82125 2.82125 0 1 1 4.45478 2.4192.47462.47462 0 1 0 .55066.773 3.78317 3.78317 0 0 0 1.44806-2.0736 2.8224 2.8224 0 0 1-.97574 5.46969z"/>
</svg>
\ No newline at end of file
<rect fill="url(#b)" height="20" width="${totalWidth}"/>
</g>
<g fill="#fff" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11" text-anchor="left">
- <text x="${margin}" y="15" fill="#010101" fill-opacity=".3">${label}</text>
- <text x="${margin}" y="14">${label}</text>
- <text x="${LabelWidthPlusMargin}" y="15" fill="#010101" fill-opacity=".3">${value}</text>
- <text x="${LabelWidthPlusMargin}" y="14">${value}</text>
+ <text x="${iconWidthPlusMargin}" y="15" fill="#010101" fill-opacity=".3">${label}</text>
+ <text x="${iconWidthPlusMargin}" y="14">${label}</text>
+ <text x="${labelWidthPlusMargin}" y="15" fill="#010101" fill-opacity=".3">${value}</text>
+ <text x="${labelWidthPlusMargin}" y="14">${value}</text>
</g>
+ <path fill="#010101" fill-opacity=".3" d="M19.58682 9.81722A3.78893 3.78893 0 0 0 17.78048 8.603v-.04378a3.77165 3.77165 0 1 0-7.5433 0v.05069a3.77165 3.77165 0 1 0 3.78317 6.28186 3.7705 3.7705 0 0 0 5.56416-5.0688zm-2.91802 5.21164a2.8247 2.8247 0 0 1-2.8224-2.82124.47463.47463 0 0 0-.94925 0 3.7486 3.7486 0 0 0 .53223 1.9296 2.8201 2.8201 0 1 1-1.08058-4.57805h.01152a1.3202 1.3202 0 0 1 .30758.14745.4747.4747 0 0 0 .61748-.72115 2.1266 2.1266 0 0 0-.61402-.32371 3.75898 3.75898 0 0 0-1.29946-.2304h-.182a2.82125 2.82125 0 1 1 4.45478 2.4192.47462.47462 0 1 0 .55066.773 3.78317 3.78317 0 0 0 1.44806-2.0736 2.8224 2.8224 0 0 1-.97574 5.46969z"/>
+ <path fill="#f3702a" d="M19.58682 9.09722A3.78893 3.78893 0 0 0 17.78048 7.883v-.04378a3.77165 3.77165 0 1 0-7.5433 0v.05069a3.77165 3.77165 0 1 0 3.78317 6.28186 3.7705 3.7705 0 0 0 5.56416-5.0688zm-2.91802 5.21164a2.8247 2.8247 0 0 1-2.8224-2.82124.47463.47463 0 0 0-.94925 0 3.7486 3.7486 0 0 0 .53223 1.9296 2.8201 2.8201 0 1 1-1.08058-4.57805h.01152a1.3202 1.3202 0 0 1 .30758.14745.4747.4747 0 0 0 .61748-.72115 2.1266 2.1266 0 0 0-.61402-.32371 3.75898 3.75898 0 0 0-1.29946-.2304h-.182a2.82125 2.82125 0 1 1 4.45478 2.4192.47462.47462 0 1 0 .55066.773 3.78317 3.78317 0 0 0 1.44806-2.0736 2.8224 2.8224 0 0 1-.97574 5.46969z"/>
</svg>
\ No newline at end of file