]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10486 Generate project badges also on SonarQube
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 20 Mar 2018 14:24:01 +0000 (15:24 +0100)
committerSonarTech <sonartech@sonarsource.com>
Thu, 29 Mar 2018 18:20:47 +0000 (20:20 +0200)
21 files changed:
server/sonar-server/src/main/java/org/sonar/server/badge/ws/ProjectBadgesWsModule.java
server/sonar-server/src/main/java/org/sonar/server/badge/ws/SvgGenerator.java
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/badge.svg [deleted file]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_failed.svg [deleted file]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_passed.svg [deleted file]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_warn.svg [deleted file]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/badge.svg [new file with mode: 0644]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_failed.svg [new file with mode: 0644]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_passed.svg [new file with mode: 0644]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_warn.svg [new file with mode: 0644]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/badge.svg [new file with mode: 0644]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_failed.svg [new file with mode: 0644]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_passed.svg [new file with mode: 0644]
server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_warn.svg [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java
server/sonar-server/src/test/java/org/sonar/server/badge/ws/ProjectBadgesWsModuleTest.java
server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectBadgesTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectSuite.java
tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectBadgesTest.java [new file with mode: 0644]
tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectSuite.java

index ec7be189267601b7787d0ef7caee6c4843502490..0a351bf21646c59e1a221d35edd221a32ed39899 100644 (file)
  */
 package org.sonar.server.badge.ws;
 
-import org.sonar.api.config.Configuration;
 import org.sonar.core.platform.Module;
 
-import static org.sonar.process.ProcessProperties.Property.SONARCLOUD_ENABLED;
-
 public class ProjectBadgesWsModule extends Module {
 
-  private final Configuration config;
-
-  public ProjectBadgesWsModule(Configuration config) {
-    this.config = config;
-  }
-
   @Override
   protected void configureModule() {
-    if (!config.getBoolean(SONARCLOUD_ENABLED.getKey()).orElse(false)) {
-      return;
-    }
     add(
       ProjectBadgesWs.class,
       QualityGateAction.class,
index 146127df9381cc16f08ac90bf0f9fa1186111b33..0da1c8fa6543195acbe9406ce33da15ed05cd7fe 100644 (file)
@@ -27,6 +27,7 @@ import java.io.IOException;
 import java.util.Map;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.text.StrSubstitutor;
+import org.sonar.api.config.Configuration;
 import org.sonar.api.measures.Metric;
 import org.sonar.api.server.ServerSide;
 
@@ -35,10 +36,14 @@ import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.sonar.api.measures.Metric.Level.ERROR;
 import static org.sonar.api.measures.Metric.Level.OK;
 import static org.sonar.api.measures.Metric.Level.WARN;
+import static org.sonar.process.ProcessProperties.Property.SONARCLOUD_ENABLED;
 
 @ServerSide
 public class SvgGenerator {
 
+  private static final String TEMPLATES_SONARCLOUD = "templates/sonarcloud";
+  private static final String TEMPLATES_SONARQUBE = "templates/sonarqube";
+
   private static final FontRenderContext FONT_RENDER_CONTEXT = new FontRenderContext(new AffineTransform(), true, true);
   private static final Font FONT = new Font("Verdana", Font.PLAIN, 11);
 
@@ -58,13 +63,15 @@ public class SvgGenerator {
   private final String badgeTemplate;
   private final Map<Metric.Level, String> qualityGateTemplates;
 
-  public SvgGenerator() {
-    this.errorTemplate = readTemplate("error.svg");
-    this.badgeTemplate = readTemplate("badge.svg");
+  public SvgGenerator(Configuration config) {
+    boolean isOnSonarCloud = config.getBoolean(SONARCLOUD_ENABLED.getKey()).orElse(false);
+    String templatePath = isOnSonarCloud ? TEMPLATES_SONARCLOUD : TEMPLATES_SONARQUBE;
+    this.errorTemplate = readTemplate("templates/error.svg");
+    this.badgeTemplate = readTemplate(templatePath + "/badge.svg");
     this.qualityGateTemplates = ImmutableMap.of(
-      OK, readTemplate("quality_gate_passed.svg"),
-      WARN, readTemplate("quality_gate_warn.svg"),
-      ERROR, readTemplate("quality_gate_failed.svg"));
+      OK, readTemplate(templatePath + "/quality_gate_passed.svg"),
+      WARN, readTemplate(templatePath + "/quality_gate_warn.svg"),
+      ERROR, readTemplate(templatePath + "/quality_gate_failed.svg"));
   }
 
   public String generateBadge(String label, String value, Color backgroundValueColor) {
@@ -103,7 +110,7 @@ public class SvgGenerator {
 
   private String readTemplate(String template) {
     try {
-      return IOUtils.toString(getClass().getResource("templates/" + template), UTF_8);
+      return IOUtils.toString(getClass().getResource(template), UTF_8);
     } catch (IOException e) {
       throw new IllegalStateException(String.format("Can't read svg template '%s'", template), e);
     }
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/badge.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/badge.svg
deleted file mode 100644 (file)
index 5a29589..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" height="20" width="${totalWidth}">
-    <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="${totalWidth}" height="20" rx="3" fill="#fff"/>
-    </clipPath>
-    <g clip-path="url(#a)">
-        <rect fill="#555" height="20" width="${labelWidth}"/>
-        <rect fill="${color}" height="20" width="${valueWidth}" x="${labelWidth}"/>
-        <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="${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>
-    <g fill="#4e9bcd">
-        <path d="M17.975 16.758h-.815c0-6.557-5.411-11.893-12.062-11.893v-.813c7.102 0 12.877 5.7 12.877 12.706z"/>
-        <path d="M18.538 12.386c-.978-4.116-4.311-7.55-8.49-8.748l.186-.65c4.411 1.266 7.93 4.895 8.964 9.243zm.626-3.856a12.48 12.48 0 0 0-4.832-5.399l.282-.464a13.031 13.031 0 0 1 5.044 5.63z"/>
-    </g>
-</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_failed.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_failed.svg
deleted file mode 100644 (file)
index 38a288f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128" height="96">
-       <path fill="#fff" d="M328.4 259.5H21.3c-10.6 0-19.5-8.7-19.5-19.5V22c0-10.6 8.7-19.5 19.5-19.5h307.1c10.6 0 19.5 8.7 19.5 19.5v218c0 10.8-8.9 19.5-19.5 19.5z"/>
-       <path fill="#cfd3d7" d="M328.4 260.4H21.3C10.1 260.4.9 251.2.9 240V22c0-11.2 9.2-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4v218c0 11.2-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.2-1.5-4.2s-2.1-1.5-3.5-1.5z"/>
-       <path fill="#ed333a" d="M213 162.9h-77.2c-17.6 0-31.9-14.4-31.9-31.9 0-17.6 14.4-31.9 31.9-31.9H213c17.6 0 31.9 14.4 31.9 31.9 0 17.6-14.3 31.9-31.9 31.9z"/>
-       <path fill="#fff" d="M156.1 132.3h-12v12.4h-6.2v-30.3h19.7v5.1h-13.5v7.8h12v5zm18.3 6.1h-11l-2.1 6.2h-6.6l11.3-30.3h5.8l11.4 30.3h-6.6l-2.2-6.2zm-9.3-5h7.6l-3.8-11.4-3.8 11.4zm27.5 11.3h-6.2v-30.3h6.2v30.3zm12-5h13.3v5h-19.5v-30.3h6.2v25.3z"/>
-       <path fill="#1b171b" d="M55.35 215.864a13.464 13.464 0 0 0 5.954 1.683c2.092 0 2.956-.729 2.956-1.863s-.679-1.683-3.271-2.547c-4.595-1.548-6.368-4.05-6.3-6.683 0-4.14 3.55-7.276 9.05-7.276a14.882 14.882 0 0 1 6.277 1.274l-1.251 4.77a10.908 10.908 0 0 0-4.815-1.274c-1.683 0-2.642.68-2.642 1.8 0 1.049.869 1.593 3.6 2.547 4.23 1.454 6.003 3.6 6.048 6.867 0 4.135-3.271 7.2-9.639 7.2-2.911 0-5.499-.639-7.2-1.548zM95.284 210.54c0 8.141-5.774 11.872-11.737 11.872-6.497.004-11.497-4.262-11.497-11.462s4.725-11.776 11.867-11.776c6.821 0 11.366 4.684 11.366 11.367zm-16.102.23c0 3.82 1.594 6.683 4.55 6.683 2.7 0 4.41-2.7 4.41-6.683 0-3.321-1.274-6.691-4.41-6.691-3.316.004-4.55 3.415-4.55 6.691zM97.75 206.77c0-2.773-.09-5.14-.185-7.093h5.985l.315 3.042h.14a8.136 8.136 0 0 1 6.862-3.546c4.55 0 7.96 2.997 7.96 9.55v13.189h-6.889V209.6c0-2.867-.999-4.82-3.501-4.82a3.681 3.681 0 0 0-3.501 2.57 4.684 4.684 0 0 0-.275 1.728v12.83H97.75zM135.226 221.912l-.41-2.25h-.135c-1.454 1.778-3.735 2.732-6.368 2.732-4.5 0-7.2-3.281-7.2-6.822 0-5.774 5.185-8.55 13.05-8.51v-.315c0-1.183-.639-2.867-4.05-2.867a12.51 12.51 0 0 0-6.138 1.679l-1.278-4.455c1.548-.868 4.595-1.957 8.64-1.957 7.416 0 9.779 4.365 9.779 9.594v7.73a34.164 34.164 0 0 0 .32 5.4zm-.815-10.512c-3.636-.045-6.457.824-6.457 3.501 0 1.778 1.183 2.642 2.731 2.642a3.776 3.776 0 0 0 3.6-2.547 4.891 4.891 0 0 0 .14-1.184zM144.784 206.994c0-3.271-.09-5.4-.185-7.317h5.958l.243 4.073h.18c1.138-3.227 3.865-4.59 6.003-4.59a7.452 7.452 0 0 1 1.467.09v6.516a9.819 9.819 0 0 0-1.863-.184c-2.547 0-4.275 1.35-4.734 3.5a8.523 8.523 0 0 0-.135 1.548v11.282h-6.934zM204.058 215.9c0 2.25.045 4.275.184 6.003h-3.55l-.23-3.6h-.085a8.293 8.293 0 0 1-7.277 4.095c-3.456 0-7.6-1.908-7.6-9.639v-12.861h4v12.19c0 4.181 1.273 7.007 4.914 7.007a5.796 5.796 0 0 0 5.274-3.645 5.918 5.918 0 0 0 .364-2.047v-13.5h4.005zM208.702 221.912c.09-1.503.18-3.735.18-5.688V189.62h3.955v13.828h.09c1.409-2.457 3.956-4.05 7.506-4.05 5.454 0 9.32 4.55 9.275 11.25 0 7.871-4.95 11.781-9.864 11.781-3.186 0-5.729-1.228-7.367-4.14h-.14l-.18 3.641zm4.135-8.825a7.416 7.416 0 0 0 .185 1.454 6.17 6.17 0 0 0 5.998 4.684c4.19 0 6.683-3.41 6.683-8.455 0-4.41-2.25-8.186-6.548-8.186a6.377 6.377 0 0 0-6.093 4.91 7.861 7.861 0 0 0-.23 1.638zM235.175 211.634c.086 5.4 3.546 7.65 7.546 7.65a14.508 14.508 0 0 0 6.094-1.134l.684 2.867c-1.409.634-3.821 1.35-7.322 1.35-6.777 0-10.827-4.455-10.827-11.093s3.91-11.871 10.323-11.871c7.2 0 9.095 6.3 9.095 10.35a15.152 15.152 0 0 1-.135 1.863zm11.732-2.866c.045-2.547-1.04-6.507-5.544-6.507-4.05 0-5.823 3.735-6.143 6.507zM180.748 203.863a11.885 11.885 0 1 0-5.09 17.581l4.599 7.47 3.65-2.48-4.6-7.47a11.889 11.889 0 0 0 1.44-15.101m-5.152 13.567a8.325 8.325 0 1 1 2.205-11.565 8.334 8.334 0 0 1-2.205 11.565"/>
-       <g fill="#4e9bcd">
-               <path d="M278.123 222.006h-2.821c0-22.698-18.73-41.166-41.752-41.166v-2.817c24.58 0 44.573 19.728 44.573 43.983z"/>
-               <path d="M280.072 206.869c-3.384-14.243-14.922-26.127-29.372-30.281l.648-2.25c15.268 4.383 27.45 16.943 31.028 31.995zM282.24 193.504a43.2 43.2 0 0 0-16.726-18.671l.977-1.607a45.108 45.108 0 0 1 17.46 19.49z"/>
-       </g>
-</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_passed.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_passed.svg
deleted file mode 100644 (file)
index eae908e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128" height="96">
-    <path fill="#fff" d="M328.4 259.5H21.5C10.9 259.5 2 250.8 2 240V21.9C2 11.3 10.7 2.4 21.5 2.4h307.1c10.6 0 19.5 8.7 19.5 19.5V240c-.2 10.8-8.8 19.5-19.7 19.5z"/>
-    <path fill="#cfd3d7" d="M328.4 260.4H21.5c-11.2 0-20.4-9.2-20.4-20.4V21.9c0-11.2 9-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4V240c-.2 11.2-9.2 20.4-20.6 20.4zM21.5 3.3c-10.3 0-18.6 8.3-18.6 18.6V240c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18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 4.9h-6.2c0-1.4-.4-2.5-1.3-3.2-.9-.8-2.1-1.2-3.7-1.2-1.5 0-2.7.3-3.6 1-.8.6-1.3 1.5-1.3 2.6 0 1 .5 1.8 1.5 2.5s2.5 1.3 4.4 1.9c3.6 1.1 6.1 2.4 7.8 4 1.6 1.6 2.4 3.6 2.4 5.9 0 2.6-1 4.7-3 6.2s-4.7 2.2-8 2.2c-2.3 0-4.5-.4-6.4-1.3-1.9-.9-3.4-2-4.4-3.5-1-1.5-1.5-3.2-1.5-5.2h6.3c0 3.3 2 5 6 5 1.5 0 2.6-.3 3.5-.9.7-.7 1.2-1.5 1.2-2.6z"/>
-    <path fill="#1b171b" d="M55.35 215.864a13.464 13.464 0 0 0 5.954 1.683c2.092 0 2.956-.729 2.956-1.863s-.679-1.683-3.271-2.547c-4.595-1.548-6.368-4.05-6.3-6.683 0-4.14 3.55-7.276 9.05-7.276a14.882 14.882 0 0 1 6.277 1.274l-1.251 4.77a10.908 10.908 0 0 0-4.815-1.274c-1.683 0-2.642.68-2.642 1.8 0 1.049.869 1.593 3.6 2.547 4.23 1.454 6.003 3.6 6.048 6.867 0 4.135-3.271 7.2-9.639 7.2-2.911 0-5.499-.639-7.2-1.548zM95.284 210.54c0 8.141-5.774 11.872-11.737 11.872-6.497.004-11.497-4.262-11.497-11.462s4.725-11.776 11.867-11.776c6.821 0 11.366 4.684 11.366 11.367zm-16.102.23c0 3.82 1.594 6.683 4.55 6.683 2.7 0 4.41-2.7 4.41-6.683 0-3.321-1.274-6.691-4.41-6.691-3.316.004-4.55 3.415-4.55 6.691zM97.75 206.77c0-2.773-.09-5.14-.185-7.093h5.985l.315 3.042h.14a8.136 8.136 0 0 1 6.862-3.546c4.55 0 7.96 2.997 7.96 9.55v13.189h-6.889V209.6c0-2.867-.999-4.82-3.501-4.82a3.681 3.681 0 0 0-3.501 2.57 4.684 4.684 0 0 0-.275 1.728v12.83H97.75zM135.226 221.912l-.41-2.25h-.135c-1.454 1.778-3.735 2.732-6.368 2.732-4.5 0-7.2-3.281-7.2-6.822 0-5.774 5.185-8.55 13.05-8.51v-.315c0-1.183-.639-2.867-4.05-2.867a12.51 12.51 0 0 0-6.138 1.679l-1.278-4.455c1.548-.868 4.595-1.957 8.64-1.957 7.416 0 9.779 4.365 9.779 9.594v7.73a34.164 34.164 0 0 0 .32 5.4zm-.815-10.512c-3.636-.045-6.457.824-6.457 3.501 0 1.778 1.183 2.642 2.731 2.642a3.776 3.776 0 0 0 3.6-2.547 4.891 4.891 0 0 0 .14-1.184zM144.784 206.994c0-3.271-.09-5.4-.185-7.317h5.958l.243 4.073h.18c1.138-3.227 3.865-4.59 6.003-4.59a7.452 7.452 0 0 1 1.467.09v6.516a9.819 9.819 0 0 0-1.863-.184c-2.547 0-4.275 1.35-4.734 3.5a8.523 8.523 0 0 0-.135 1.548v11.282h-6.934zM204.058 215.9c0 2.25.045 4.275.184 6.003h-3.55l-.23-3.6h-.085a8.293 8.293 0 0 1-7.277 4.095c-3.456 0-7.6-1.908-7.6-9.639v-12.861h4v12.19c0 4.181 1.273 7.007 4.914 7.007a5.796 5.796 0 0 0 5.274-3.645 5.918 5.918 0 0 0 .364-2.047v-13.5h4.005zM208.702 221.912c.09-1.503.18-3.735.18-5.688V189.62h3.955v13.828h.09c1.409-2.457 3.956-4.05 7.506-4.05 5.454 0 9.32 4.55 9.275 11.25 0 7.871-4.95 11.781-9.864 11.781-3.186 0-5.729-1.228-7.367-4.14h-.14l-.18 3.641zm4.135-8.825a7.416 7.416 0 0 0 .185 1.454 6.17 6.17 0 0 0 5.998 4.684c4.19 0 6.683-3.41 6.683-8.455 0-4.41-2.25-8.186-6.548-8.186a6.377 6.377 0 0 0-6.093 4.91 7.861 7.861 0 0 0-.23 1.638zM235.175 211.634c.086 5.4 3.546 7.65 7.546 7.65a14.508 14.508 0 0 0 6.094-1.134l.684 2.867c-1.409.634-3.821 1.35-7.322 1.35-6.777 0-10.827-4.455-10.827-11.093s3.91-11.871 10.323-11.871c7.2 0 9.095 6.3 9.095 10.35a15.152 15.152 0 0 1-.135 1.863zm11.732-2.866c.045-2.547-1.04-6.507-5.544-6.507-4.05 0-5.823 3.735-6.143 6.507zM180.748 203.863a11.885 11.885 0 1 0-5.09 17.581l4.599 7.47 3.65-2.48-4.6-7.47a11.889 11.889 0 0 0 1.44-15.101m-5.152 13.567a8.325 8.325 0 1 1 2.205-11.565 8.334 8.334 0 0 1-2.205 11.565"/>
-    <g fill="#4e9bcd">
-        <path d="M278.123 222.006h-2.821c0-22.698-18.73-41.166-41.752-41.166v-2.817c24.58 0 44.573 19.728 44.573 43.983z"/>
-        <path d="M280.072 206.869c-3.384-14.243-14.922-26.127-29.372-30.281l.648-2.25c15.268 4.383 27.45 16.943 31.028 31.995zM282.24 193.504a43.2 43.2 0 0 0-16.726-18.671l.977-1.607a45.108 45.108 0 0 1 17.46 19.49z"/>
-    </g>
-</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_warn.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/quality_gate_warn.svg
deleted file mode 100644 (file)
index 420cda6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128" height="96">
-    <path fill="#fff" d="M328.4 259.5H21.3c-10.6 0-19.5-8.7-19.5-19.5V22c0-10.6 8.7-19.5 19.5-19.5h307.1c10.6 0 19.5 8.7 19.5 19.5v218c0 10.8-8.9 19.5-19.5 19.5z"/>
-    <path fill="#cfd3d7" d="M328.4 260.4H21.3C10.1 260.4.9 251.2.9 240V22c0-11.2 9.2-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4v218c0 11.2-9.3 20.4-20.4 20.4zM21.3 3.4C11 3.4 2.7 11.7 2.7 22v218c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V22c0-10.3-8.3-18.6-18.6-18.6H21.3z"/>
-    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-6.3l-4.9-20.3-4.9 20.3h-6.3l-6.7-30.3h6.2l4.1 21.5 5-21.5h5.3l4.9 21.6zm29.9 2.5h-11l-2.1 6.2h-6.6l11.3-30.3h5.8l11.4 30.3h-6.6l-2.2-6.2zm-9.3-5h7.6l-3.8-11.4-3.8 11.4zm32.1.2h-5v11.1h-6.2v-30.3h11.3c3.6 0 6.3.8 8.3 2.4 1.9 1.6 2.9 3.9 2.9 6.8 0 2.1-.4 3.8-1.3 5.2-.9 1.4-2.3 2.5-4.1 3.3l6.6 12.4v.3h-6.7l-5.8-11.2zm-5-5.1h5c1.6 0 2.8-.4 3.6-1.2.9-.8 1.3-1.9 1.3-3.3s-.4-2.6-1.2-3.4c-.8-.8-2.1-1.2-3.7-1.2h-5v9.1zm45.7 16.2h-6.2l-12.2-20v20h-6.2v-30.3h6.2l12.2 20v-20h6.2v30.3z"/>
-       <path fill="#1b171b" d="M55.35 215.864a13.464 13.464 0 0 0 5.954 1.683c2.092 0 2.956-.729 2.956-1.863s-.679-1.683-3.271-2.547c-4.595-1.548-6.368-4.05-6.3-6.683 0-4.14 3.55-7.276 9.05-7.276a14.882 14.882 0 0 1 6.277 1.274l-1.251 4.77a10.908 10.908 0 0 0-4.815-1.274c-1.683 0-2.642.68-2.642 1.8 0 1.049.869 1.593 3.6 2.547 4.23 1.454 6.003 3.6 6.048 6.867 0 4.135-3.271 7.2-9.639 7.2-2.911 0-5.499-.639-7.2-1.548zM95.284 210.54c0 8.141-5.774 11.872-11.737 11.872-6.497.004-11.497-4.262-11.497-11.462s4.725-11.776 11.867-11.776c6.821 0 11.366 4.684 11.366 11.367zm-16.102.23c0 3.82 1.594 6.683 4.55 6.683 2.7 0 4.41-2.7 4.41-6.683 0-3.321-1.274-6.691-4.41-6.691-3.316.004-4.55 3.415-4.55 6.691zM97.75 206.77c0-2.773-.09-5.14-.185-7.093h5.985l.315 3.042h.14a8.136 8.136 0 0 1 6.862-3.546c4.55 0 7.96 2.997 7.96 9.55v13.189h-6.889V209.6c0-2.867-.999-4.82-3.501-4.82a3.681 3.681 0 0 0-3.501 2.57 4.684 4.684 0 0 0-.275 1.728v12.83H97.75zM135.226 221.912l-.41-2.25h-.135c-1.454 1.778-3.735 2.732-6.368 2.732-4.5 0-7.2-3.281-7.2-6.822 0-5.774 5.185-8.55 13.05-8.51v-.315c0-1.183-.639-2.867-4.05-2.867a12.51 12.51 0 0 0-6.138 1.679l-1.278-4.455c1.548-.868 4.595-1.957 8.64-1.957 7.416 0 9.779 4.365 9.779 9.594v7.73a34.164 34.164 0 0 0 .32 5.4zm-.815-10.512c-3.636-.045-6.457.824-6.457 3.501 0 1.778 1.183 2.642 2.731 2.642a3.776 3.776 0 0 0 3.6-2.547 4.891 4.891 0 0 0 .14-1.184zM144.784 206.994c0-3.271-.09-5.4-.185-7.317h5.958l.243 4.073h.18c1.138-3.227 3.865-4.59 6.003-4.59a7.452 7.452 0 0 1 1.467.09v6.516a9.819 9.819 0 0 0-1.863-.184c-2.547 0-4.275 1.35-4.734 3.5a8.523 8.523 0 0 0-.135 1.548v11.282h-6.934zM204.058 215.9c0 2.25.045 4.275.184 6.003h-3.55l-.23-3.6h-.085a8.293 8.293 0 0 1-7.277 4.095c-3.456 0-7.6-1.908-7.6-9.639v-12.861h4v12.19c0 4.181 1.273 7.007 4.914 7.007a5.796 5.796 0 0 0 5.274-3.645 5.918 5.918 0 0 0 .364-2.047v-13.5h4.005zM208.702 221.912c.09-1.503.18-3.735.18-5.688V189.62h3.955v13.828h.09c1.409-2.457 3.956-4.05 7.506-4.05 5.454 0 9.32 4.55 9.275 11.25 0 7.871-4.95 11.781-9.864 11.781-3.186 0-5.729-1.228-7.367-4.14h-.14l-.18 3.641zm4.135-8.825a7.416 7.416 0 0 0 .185 1.454 6.17 6.17 0 0 0 5.998 4.684c4.19 0 6.683-3.41 6.683-8.455 0-4.41-2.25-8.186-6.548-8.186a6.377 6.377 0 0 0-6.093 4.91 7.861 7.861 0 0 0-.23 1.638zM235.175 211.634c.086 5.4 3.546 7.65 7.546 7.65a14.508 14.508 0 0 0 6.094-1.134l.684 2.867c-1.409.634-3.821 1.35-7.322 1.35-6.777 0-10.827-4.455-10.827-11.093s3.91-11.871 10.323-11.871c7.2 0 9.095 6.3 9.095 10.35a15.152 15.152 0 0 1-.135 1.863zm11.732-2.866c.045-2.547-1.04-6.507-5.544-6.507-4.05 0-5.823 3.735-6.143 6.507zM180.748 203.863a11.885 11.885 0 1 0-5.09 17.581l4.599 7.47 3.65-2.48-4.6-7.47a11.889 11.889 0 0 0 1.44-15.101m-5.152 13.567a8.325 8.325 0 1 1 2.205-11.565 8.334 8.334 0 0 1-2.205 11.565"/>
-       <g fill="#4e9bcd">
-               <path d="M278.123 222.006h-2.821c0-22.698-18.73-41.166-41.752-41.166v-2.817c24.58 0 44.573 19.728 44.573 43.983z"/>
-        <path d="M280.072 206.869c-3.384-14.243-14.922-26.127-29.372-30.281l.648-2.25c15.268 4.383 27.45 16.943 31.028 31.995zM282.24 193.504a43.2 43.2 0 0 0-16.726-18.671l.977-1.607a45.108 45.108 0 0 1 17.46 19.49z"/>
-    </g>
-</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/badge.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/badge.svg
new file mode 100644 (file)
index 0000000..5a29589
--- /dev/null
@@ -0,0 +1,24 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="20" width="${totalWidth}">
+    <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="${totalWidth}" height="20" rx="3" fill="#fff"/>
+    </clipPath>
+    <g clip-path="url(#a)">
+        <rect fill="#555" height="20" width="${labelWidth}"/>
+        <rect fill="${color}" height="20" width="${valueWidth}" x="${labelWidth}"/>
+        <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="${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>
+    <g fill="#4e9bcd">
+        <path d="M17.975 16.758h-.815c0-6.557-5.411-11.893-12.062-11.893v-.813c7.102 0 12.877 5.7 12.877 12.706z"/>
+        <path d="M18.538 12.386c-.978-4.116-4.311-7.55-8.49-8.748l.186-.65c4.411 1.266 7.93 4.895 8.964 9.243zm.626-3.856a12.48 12.48 0 0 0-4.832-5.399l.282-.464a13.031 13.031 0 0 1 5.044 5.63z"/>
+    </g>
+</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_failed.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_failed.svg
new file mode 100644 (file)
index 0000000..38a288f
--- /dev/null
@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128" height="96">
+       <path fill="#fff" d="M328.4 259.5H21.3c-10.6 0-19.5-8.7-19.5-19.5V22c0-10.6 8.7-19.5 19.5-19.5h307.1c10.6 0 19.5 8.7 19.5 19.5v218c0 10.8-8.9 19.5-19.5 19.5z"/>
+       <path fill="#cfd3d7" d="M328.4 260.4H21.3C10.1 260.4.9 251.2.9 240V22c0-11.2 9.2-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4v218c0 11.2-9.3 20.4-20.4 20.4zM21.3 3.4C11 3.4 2.7 11.7 2.7 22v218c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V22c0-10.3-8.3-18.6-18.6-18.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.4 31.9 31.9 0 17.6-14.3 31.9-31.9 31.9z"/>
+       <path fill="#fff" d="M156.1 132.3h-12v12.4h-6.2v-30.3h19.7v5.1h-13.5v7.8h12v5zm18.3 6.1h-11l-2.1 6.2h-6.6l11.3-30.3h5.8l11.4 30.3h-6.6l-2.2-6.2zm-9.3-5h7.6l-3.8-11.4-3.8 11.4zm27.5 11.3h-6.2v-30.3h6.2v30.3zm12-5h13.3v5h-19.5v-30.3h6.2v25.3z"/>
+       <path fill="#1b171b" d="M55.35 215.864a13.464 13.464 0 0 0 5.954 1.683c2.092 0 2.956-.729 2.956-1.863s-.679-1.683-3.271-2.547c-4.595-1.548-6.368-4.05-6.3-6.683 0-4.14 3.55-7.276 9.05-7.276a14.882 14.882 0 0 1 6.277 1.274l-1.251 4.77a10.908 10.908 0 0 0-4.815-1.274c-1.683 0-2.642.68-2.642 1.8 0 1.049.869 1.593 3.6 2.547 4.23 1.454 6.003 3.6 6.048 6.867 0 4.135-3.271 7.2-9.639 7.2-2.911 0-5.499-.639-7.2-1.548zM95.284 210.54c0 8.141-5.774 11.872-11.737 11.872-6.497.004-11.497-4.262-11.497-11.462s4.725-11.776 11.867-11.776c6.821 0 11.366 4.684 11.366 11.367zm-16.102.23c0 3.82 1.594 6.683 4.55 6.683 2.7 0 4.41-2.7 4.41-6.683 0-3.321-1.274-6.691-4.41-6.691-3.316.004-4.55 3.415-4.55 6.691zM97.75 206.77c0-2.773-.09-5.14-.185-7.093h5.985l.315 3.042h.14a8.136 8.136 0 0 1 6.862-3.546c4.55 0 7.96 2.997 7.96 9.55v13.189h-6.889V209.6c0-2.867-.999-4.82-3.501-4.82a3.681 3.681 0 0 0-3.501 2.57 4.684 4.684 0 0 0-.275 1.728v12.83H97.75zM135.226 221.912l-.41-2.25h-.135c-1.454 1.778-3.735 2.732-6.368 2.732-4.5 0-7.2-3.281-7.2-6.822 0-5.774 5.185-8.55 13.05-8.51v-.315c0-1.183-.639-2.867-4.05-2.867a12.51 12.51 0 0 0-6.138 1.679l-1.278-4.455c1.548-.868 4.595-1.957 8.64-1.957 7.416 0 9.779 4.365 9.779 9.594v7.73a34.164 34.164 0 0 0 .32 5.4zm-.815-10.512c-3.636-.045-6.457.824-6.457 3.501 0 1.778 1.183 2.642 2.731 2.642a3.776 3.776 0 0 0 3.6-2.547 4.891 4.891 0 0 0 .14-1.184zM144.784 206.994c0-3.271-.09-5.4-.185-7.317h5.958l.243 4.073h.18c1.138-3.227 3.865-4.59 6.003-4.59a7.452 7.452 0 0 1 1.467.09v6.516a9.819 9.819 0 0 0-1.863-.184c-2.547 0-4.275 1.35-4.734 3.5a8.523 8.523 0 0 0-.135 1.548v11.282h-6.934zM204.058 215.9c0 2.25.045 4.275.184 6.003h-3.55l-.23-3.6h-.085a8.293 8.293 0 0 1-7.277 4.095c-3.456 0-7.6-1.908-7.6-9.639v-12.861h4v12.19c0 4.181 1.273 7.007 4.914 7.007a5.796 5.796 0 0 0 5.274-3.645 5.918 5.918 0 0 0 .364-2.047v-13.5h4.005zM208.702 221.912c.09-1.503.18-3.735.18-5.688V189.62h3.955v13.828h.09c1.409-2.457 3.956-4.05 7.506-4.05 5.454 0 9.32 4.55 9.275 11.25 0 7.871-4.95 11.781-9.864 11.781-3.186 0-5.729-1.228-7.367-4.14h-.14l-.18 3.641zm4.135-8.825a7.416 7.416 0 0 0 .185 1.454 6.17 6.17 0 0 0 5.998 4.684c4.19 0 6.683-3.41 6.683-8.455 0-4.41-2.25-8.186-6.548-8.186a6.377 6.377 0 0 0-6.093 4.91 7.861 7.861 0 0 0-.23 1.638zM235.175 211.634c.086 5.4 3.546 7.65 7.546 7.65a14.508 14.508 0 0 0 6.094-1.134l.684 2.867c-1.409.634-3.821 1.35-7.322 1.35-6.777 0-10.827-4.455-10.827-11.093s3.91-11.871 10.323-11.871c7.2 0 9.095 6.3 9.095 10.35a15.152 15.152 0 0 1-.135 1.863zm11.732-2.866c.045-2.547-1.04-6.507-5.544-6.507-4.05 0-5.823 3.735-6.143 6.507zM180.748 203.863a11.885 11.885 0 1 0-5.09 17.581l4.599 7.47 3.65-2.48-4.6-7.47a11.889 11.889 0 0 0 1.44-15.101m-5.152 13.567a8.325 8.325 0 1 1 2.205-11.565 8.334 8.334 0 0 1-2.205 11.565"/>
+       <g fill="#4e9bcd">
+               <path d="M278.123 222.006h-2.821c0-22.698-18.73-41.166-41.752-41.166v-2.817c24.58 0 44.573 19.728 44.573 43.983z"/>
+               <path d="M280.072 206.869c-3.384-14.243-14.922-26.127-29.372-30.281l.648-2.25c15.268 4.383 27.45 16.943 31.028 31.995zM282.24 193.504a43.2 43.2 0 0 0-16.726-18.671l.977-1.607a45.108 45.108 0 0 1 17.46 19.49z"/>
+       </g>
+</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_passed.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_passed.svg
new file mode 100644 (file)
index 0000000..eae908e
--- /dev/null
@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128" height="96">
+    <path fill="#fff" d="M328.4 259.5H21.5C10.9 259.5 2 250.8 2 240V21.9C2 11.3 10.7 2.4 21.5 2.4h307.1c10.6 0 19.5 8.7 19.5 19.5V240c-.2 10.8-8.8 19.5-19.7 19.5z"/>
+    <path fill="#cfd3d7" d="M328.4 260.4H21.5c-11.2 0-20.4-9.2-20.4-20.4V21.9c0-11.2 9-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4V240c-.2 11.2-9.2 20.4-20.6 20.4zM21.5 3.3c-10.3 0-18.6 8.3-18.6 18.6V240c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V21.9c0-10.3-8.3-18.6-18.6-18.6H21.5z"/>
+    <path fill="#434447" d="M94.9 54.1c0 2.7-.4 5-1.3 7-.9 1.9-2.1 3.5-3.6 4.6l5 3.9-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5 2.5s2.5 1.3 4.4 1.9c3.6 1.1 6.1 2.4 7.8 4 1.6 1.6 2.4 3.6 2.4 5.9 0 2.6-1 4.7-3 6.2s-4.7 2.2-8 2.2c-2.3 0-4.5-.4-6.4-1.3-1.9-.9-3.4-2-4.4-3.5-1-1.5-1.5-3.2-1.5-5.2h6.3c0 3.3 2 5 6 5 1.5 0 2.6-.3 3.5-.9.7-.7 1.2-1.5 1.2-2.6z"/>
+    <path fill="#1b171b" d="M55.35 215.864a13.464 13.464 0 0 0 5.954 1.683c2.092 0 2.956-.729 2.956-1.863s-.679-1.683-3.271-2.547c-4.595-1.548-6.368-4.05-6.3-6.683 0-4.14 3.55-7.276 9.05-7.276a14.882 14.882 0 0 1 6.277 1.274l-1.251 4.77a10.908 10.908 0 0 0-4.815-1.274c-1.683 0-2.642.68-2.642 1.8 0 1.049.869 1.593 3.6 2.547 4.23 1.454 6.003 3.6 6.048 6.867 0 4.135-3.271 7.2-9.639 7.2-2.911 0-5.499-.639-7.2-1.548zM95.284 210.54c0 8.141-5.774 11.872-11.737 11.872-6.497.004-11.497-4.262-11.497-11.462s4.725-11.776 11.867-11.776c6.821 0 11.366 4.684 11.366 11.367zm-16.102.23c0 3.82 1.594 6.683 4.55 6.683 2.7 0 4.41-2.7 4.41-6.683 0-3.321-1.274-6.691-4.41-6.691-3.316.004-4.55 3.415-4.55 6.691zM97.75 206.77c0-2.773-.09-5.14-.185-7.093h5.985l.315 3.042h.14a8.136 8.136 0 0 1 6.862-3.546c4.55 0 7.96 2.997 7.96 9.55v13.189h-6.889V209.6c0-2.867-.999-4.82-3.501-4.82a3.681 3.681 0 0 0-3.501 2.57 4.684 4.684 0 0 0-.275 1.728v12.83H97.75zM135.226 221.912l-.41-2.25h-.135c-1.454 1.778-3.735 2.732-6.368 2.732-4.5 0-7.2-3.281-7.2-6.822 0-5.774 5.185-8.55 13.05-8.51v-.315c0-1.183-.639-2.867-4.05-2.867a12.51 12.51 0 0 0-6.138 1.679l-1.278-4.455c1.548-.868 4.595-1.957 8.64-1.957 7.416 0 9.779 4.365 9.779 9.594v7.73a34.164 34.164 0 0 0 .32 5.4zm-.815-10.512c-3.636-.045-6.457.824-6.457 3.501 0 1.778 1.183 2.642 2.731 2.642a3.776 3.776 0 0 0 3.6-2.547 4.891 4.891 0 0 0 .14-1.184zM144.784 206.994c0-3.271-.09-5.4-.185-7.317h5.958l.243 4.073h.18c1.138-3.227 3.865-4.59 6.003-4.59a7.452 7.452 0 0 1 1.467.09v6.516a9.819 9.819 0 0 0-1.863-.184c-2.547 0-4.275 1.35-4.734 3.5a8.523 8.523 0 0 0-.135 1.548v11.282h-6.934zM204.058 215.9c0 2.25.045 4.275.184 6.003h-3.55l-.23-3.6h-.085a8.293 8.293 0 0 1-7.277 4.095c-3.456 0-7.6-1.908-7.6-9.639v-12.861h4v12.19c0 4.181 1.273 7.007 4.914 7.007a5.796 5.796 0 0 0 5.274-3.645 5.918 5.918 0 0 0 .364-2.047v-13.5h4.005zM208.702 221.912c.09-1.503.18-3.735.18-5.688V189.62h3.955v13.828h.09c1.409-2.457 3.956-4.05 7.506-4.05 5.454 0 9.32 4.55 9.275 11.25 0 7.871-4.95 11.781-9.864 11.781-3.186 0-5.729-1.228-7.367-4.14h-.14l-.18 3.641zm4.135-8.825a7.416 7.416 0 0 0 .185 1.454 6.17 6.17 0 0 0 5.998 4.684c4.19 0 6.683-3.41 6.683-8.455 0-4.41-2.25-8.186-6.548-8.186a6.377 6.377 0 0 0-6.093 4.91 7.861 7.861 0 0 0-.23 1.638zM235.175 211.634c.086 5.4 3.546 7.65 7.546 7.65a14.508 14.508 0 0 0 6.094-1.134l.684 2.867c-1.409.634-3.821 1.35-7.322 1.35-6.777 0-10.827-4.455-10.827-11.093s3.91-11.871 10.323-11.871c7.2 0 9.095 6.3 9.095 10.35a15.152 15.152 0 0 1-.135 1.863zm11.732-2.866c.045-2.547-1.04-6.507-5.544-6.507-4.05 0-5.823 3.735-6.143 6.507zM180.748 203.863a11.885 11.885 0 1 0-5.09 17.581l4.599 7.47 3.65-2.48-4.6-7.47a11.889 11.889 0 0 0 1.44-15.101m-5.152 13.567a8.325 8.325 0 1 1 2.205-11.565 8.334 8.334 0 0 1-2.205 11.565"/>
+    <g fill="#4e9bcd">
+        <path d="M278.123 222.006h-2.821c0-22.698-18.73-41.166-41.752-41.166v-2.817c24.58 0 44.573 19.728 44.573 43.983z"/>
+        <path d="M280.072 206.869c-3.384-14.243-14.922-26.127-29.372-30.281l.648-2.25c15.268 4.383 27.45 16.943 31.028 31.995zM282.24 193.504a43.2 43.2 0 0 0-16.726-18.671l.977-1.607a45.108 45.108 0 0 1 17.46 19.49z"/>
+    </g>
+</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_warn.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarcloud/quality_gate_warn.svg
new file mode 100644 (file)
index 0000000..420cda6
--- /dev/null
@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128" height="96">
+    <path fill="#fff" d="M328.4 259.5H21.3c-10.6 0-19.5-8.7-19.5-19.5V22c0-10.6 8.7-19.5 19.5-19.5h307.1c10.6 0 19.5 8.7 19.5 19.5v218c0 10.8-8.9 19.5-19.5 19.5z"/>
+    <path fill="#cfd3d7" d="M328.4 260.4H21.3C10.1 260.4.9 251.2.9 240V22c0-11.2 9.2-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4v218c0 11.2-9.3 20.4-20.4 20.4zM21.3 3.4C11 3.4 2.7 11.7 2.7 22v218c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V22c0-10.3-8.3-18.6-18.6-18.6H21.3z"/>
+    <path fill="#434447" d="M94.9 54.3c0 2.7-.4 5-1.3 7-.9 1.9-2.1 3.5-3.6 4.6l5 3.9-2.5 2.2-5.9-4.7c-.9.2-1.9.3-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3-30.3h5.8l11.4 30.3h-6.6l-2.2-6.2zm-9.3-5h7.6l-3.8-11.4-3.8 11.4zm32.1.2h-5v11.1h-6.2v-30.3h11.3c3.6 0 6.3.8 8.3 2.4 1.9 1.6 2.9 3.9 2.9 6.8 0 2.1-.4 3.8-1.3 5.2-.9 1.4-2.3 2.5-4.1 3.3l6.6 12.4v.3h-6.7l-5.8-11.2zm-5-5.1h5c1.6 0 2.8-.4 3.6-1.2.9-.8 1.3-1.9 1.3-3.3s-.4-2.6-1.2-3.4c-.8-.8-2.1-1.2-3.7-1.2h-5v9.1zm45.7 16.2h-6.2l-12.2-20v20h-6.2v-30.3h6.2l12.2 20v-20h6.2v30.3z"/>
+       <path fill="#1b171b" d="M55.35 215.864a13.464 13.464 0 0 0 5.954 1.683c2.092 0 2.956-.729 2.956-1.863s-.679-1.683-3.271-2.547c-4.595-1.548-6.368-4.05-6.3-6.683 0-4.14 3.55-7.276 9.05-7.276a14.882 14.882 0 0 1 6.277 1.274l-1.251 4.77a10.908 10.908 0 0 0-4.815-1.274c-1.683 0-2.642.68-2.642 1.8 0 1.049.869 1.593 3.6 2.547 4.23 1.454 6.003 3.6 6.048 6.867 0 4.135-3.271 7.2-9.639 7.2-2.911 0-5.499-.639-7.2-1.548zM95.284 210.54c0 8.141-5.774 11.872-11.737 11.872-6.497.004-11.497-4.262-11.497-11.462s4.725-11.776 11.867-11.776c6.821 0 11.366 4.684 11.366 11.367zm-16.102.23c0 3.82 1.594 6.683 4.55 6.683 2.7 0 4.41-2.7 4.41-6.683 0-3.321-1.274-6.691-4.41-6.691-3.316.004-4.55 3.415-4.55 6.691zM97.75 206.77c0-2.773-.09-5.14-.185-7.093h5.985l.315 3.042h.14a8.136 8.136 0 0 1 6.862-3.546c4.55 0 7.96 2.997 7.96 9.55v13.189h-6.889V209.6c0-2.867-.999-4.82-3.501-4.82a3.681 3.681 0 0 0-3.501 2.57 4.684 4.684 0 0 0-.275 1.728v12.83H97.75zM135.226 221.912l-.41-2.25h-.135c-1.454 1.778-3.735 2.732-6.368 2.732-4.5 0-7.2-3.281-7.2-6.822 0-5.774 5.185-8.55 13.05-8.51v-.315c0-1.183-.639-2.867-4.05-2.867a12.51 12.51 0 0 0-6.138 1.679l-1.278-4.455c1.548-.868 4.595-1.957 8.64-1.957 7.416 0 9.779 4.365 9.779 9.594v7.73a34.164 34.164 0 0 0 .32 5.4zm-.815-10.512c-3.636-.045-6.457.824-6.457 3.501 0 1.778 1.183 2.642 2.731 2.642a3.776 3.776 0 0 0 3.6-2.547 4.891 4.891 0 0 0 .14-1.184zM144.784 206.994c0-3.271-.09-5.4-.185-7.317h5.958l.243 4.073h.18c1.138-3.227 3.865-4.59 6.003-4.59a7.452 7.452 0 0 1 1.467.09v6.516a9.819 9.819 0 0 0-1.863-.184c-2.547 0-4.275 1.35-4.734 3.5a8.523 8.523 0 0 0-.135 1.548v11.282h-6.934zM204.058 215.9c0 2.25.045 4.275.184 6.003h-3.55l-.23-3.6h-.085a8.293 8.293 0 0 1-7.277 4.095c-3.456 0-7.6-1.908-7.6-9.639v-12.861h4v12.19c0 4.181 1.273 7.007 4.914 7.007a5.796 5.796 0 0 0 5.274-3.645 5.918 5.918 0 0 0 .364-2.047v-13.5h4.005zM208.702 221.912c.09-1.503.18-3.735.18-5.688V189.62h3.955v13.828h.09c1.409-2.457 3.956-4.05 7.506-4.05 5.454 0 9.32 4.55 9.275 11.25 0 7.871-4.95 11.781-9.864 11.781-3.186 0-5.729-1.228-7.367-4.14h-.14l-.18 3.641zm4.135-8.825a7.416 7.416 0 0 0 .185 1.454 6.17 6.17 0 0 0 5.998 4.684c4.19 0 6.683-3.41 6.683-8.455 0-4.41-2.25-8.186-6.548-8.186a6.377 6.377 0 0 0-6.093 4.91 7.861 7.861 0 0 0-.23 1.638zM235.175 211.634c.086 5.4 3.546 7.65 7.546 7.65a14.508 14.508 0 0 0 6.094-1.134l.684 2.867c-1.409.634-3.821 1.35-7.322 1.35-6.777 0-10.827-4.455-10.827-11.093s3.91-11.871 10.323-11.871c7.2 0 9.095 6.3 9.095 10.35a15.152 15.152 0 0 1-.135 1.863zm11.732-2.866c.045-2.547-1.04-6.507-5.544-6.507-4.05 0-5.823 3.735-6.143 6.507zM180.748 203.863a11.885 11.885 0 1 0-5.09 17.581l4.599 7.47 3.65-2.48-4.6-7.47a11.889 11.889 0 0 0 1.44-15.101m-5.152 13.567a8.325 8.325 0 1 1 2.205-11.565 8.334 8.334 0 0 1-2.205 11.565"/>
+       <g fill="#4e9bcd">
+               <path d="M278.123 222.006h-2.821c0-22.698-18.73-41.166-41.752-41.166v-2.817c24.58 0 44.573 19.728 44.573 43.983z"/>
+        <path d="M280.072 206.869c-3.384-14.243-14.922-26.127-29.372-30.281l.648-2.25c15.268 4.383 27.45 16.943 31.028 31.995zM282.24 193.504a43.2 43.2 0 0 0-16.726-18.671l.977-1.607a45.108 45.108 0 0 1 17.46 19.49z"/>
+    </g>
+</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/badge.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/badge.svg
new file mode 100644 (file)
index 0000000..a25766b
--- /dev/null
@@ -0,0 +1,22 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="20" width="${totalWidth}">
+    <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="${totalWidth}" height="20" rx="3" fill="#fff"/>
+    </clipPath>
+    <g clip-path="url(#a)">
+        <rect fill="#555" height="20" width="${labelWidth}"/>
+        <rect fill="${color}" height="20" width="${valueWidth}" x="${labelWidth}"/>
+        <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="${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
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_failed.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_failed.svg
new file mode 100644 (file)
index 0000000..a83f9c7
--- /dev/null
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128px" height="96px">
+       <path fill="#fff" d="M328.4 259.5H21.3c-10.6 0-19.5-8.7-19.5-19.5V22c0-10.6 8.7-19.5 19.5-19.5h307.1c10.6 0 19.5 8.7 19.5 19.5v218c0 10.8-8.9 19.5-19.5 19.5z"/>
+       <path fill="#cfd3d7" d="M328.4 260.4H21.3C10.1 260.4.9 251.2.9 240V22c0-11.2 9.2-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4v218c0 11.2-9.3 20.4-20.4 20.4zM21.3 3.4C11 3.4 2.7 11.7 2.7 22v218c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V22c0-10.3-8.3-18.6-18.6-18.6H21.3z"/>
+       <path fill="#434447" d="M94.9 54.3c0 2.7-.4 5-1.3 7-.9 1.9-2.1 3.5-3.6 4.6l5 3.9-2.5 2.2-5.9-4.7c-.9.2-1.9.3-2.9.3-2.2 0-4.1-.5-5.8-1.6-1.7-1.1-3-2.6-3.9-4.6-.9-2-1.4-4.3-1.4-6.9v-2c0-2.7.5-5 1.4-7.1.9-2.1 2.2-3.6 3.9-4.7s3.6-1.6 5.8-1.6c2.2 0 4.2.5 5.9 1.6 1.7 1.1 3 2.6 3.9 4.7.9 2 1.4 4.4 1.4 7.1v1.8zm-3.6-1.8c0-3.3-.7-5.8-2-7.6-1.3-1.8-3.2-2.7-5.6-2.7-2.3 0-4.1.9-5.5 2.6-1.3 1.8-2 4.2-2.1 7.4v2c0 3.2.7 5.7 2 7.5 1.3 1.8 3.2 2.8 5.6 2.8 2.4 0 4.2-.9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.4 0 1-.1 1.7-.2v2.9c-.9.3-1.8.4-2.7.4-1.6 0-2.8-.5-3.6-1.4-.8-1-1.2-2.3-1.2-4.1V49.4h-3.8v-2.7h3.8v-5h3.5zM272.3 67.7c-2.8 0-5.1-.9-6.8-2.8-1.8-1.8-2.6-4.3-2.6-7.4v-.6c0-2.1.4-3.9 1.2-5.5.8-1.6 1.9-2.9 3.3-3.8 1.4-.9 2.9-1.4 4.6-1.4 2.7 0 4.8.9 6.3 2.7 1.5 1.8 2.2 4.3 2.2 7.6V58h-14c.1 2 .6 3.7 1.8 4.9 1.1 1.3 2.6 1.9 4.3 1.9 1.2 0 2.3-.3 3.2-.8.9-.5 1.6-1.2 2.3-2l2.2 1.7c-1.9 2.7-4.5 4-8 4zm-.4-18.6c-1.4 0-2.6.5-3.6 1.6-1 1-1.6 2.5-1.8 4.4h10.4v-.3c-.1-1.8-.6-3.2-1.5-4.2s-2.1-1.5-3.5-1.5z"/>
+       <g>
+               <path fill="#ed333a" d="M213 162.9h-77.2c-17.6 0-31.9-14.4-31.9-31.9 0-17.6 14.4-31.9 31.9-31.9H213c17.6 0 31.9 14.4 31.9 31.9 0 17.6-14.3 31.9-31.9 31.9z"/>
+               <path fill="#fff" d="M156.1 132.3h-12v12.4h-6.2v-30.3h19.7v5.1h-13.5v7.8h12v5zM174.4 138.4h-11l-2.1 6.2h-6.6l11.3-30.3h5.8l11.4 30.3h-6.6l-2.2-6.2zm-9.3-5h7.6l-3.8-11.4-3.8 11.4zM192.6 144.7h-6.2v-30.3h6.2v30.3zM204.6 139.7h13.3v5h-19.5v-30.3h6.2v25.3z"/>
+       </g>
+       <g id="SonarCloud_Black">
+               <path fill="#f3702a" d="M302.5 204.3c-1.6-1.9-3.7-3.3-6-4v-.1c0-6.9-5.6-12.5-12.5-12.5s-12.5 5.6-12.5 12.5v.2c-5.1 1.6-8.8 6.3-8.8 11.9 0 6.9 5.6 12.5 12.5 12.5 3.3 0 6.5-1.3 8.8-3.6 2.3 2.2 5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-7.7-1.9-7.7-9.8v-13.1h4.1v12.4c0 4.2 1.3 7.1 5 7.1 2.7 0 4.6-1.9 5.3-3.7.2-.6.4-1.3.4-2.1v-13.7h4.1V216h-.1zM246.2 189.4v27c0 2 0 4.2.2 5.8h-3.6l-.2-3.9h-.1c-1.2 2.5-4 4.4-7.6 4.4-5.4 0-9.5-4.6-9.5-11.3 0-7.4 4.6-12 10-12 3.4 0 5.7 1.6 6.7 3.4h.1v-13.3l4-.1zm-4 19.5c0-.5 0-1.2-.2-1.7-.6-2.6-2.8-4.7-5.9-4.7-4.2 0-6.7 3.7-6.7 8.6 0 4.5 2.2 8.3 6.6 8.3 2.7 0 5.2-1.8 5.9-4.8.1-.6.2-1.1.2-1.8l.1-3.9z"/>
+       </g>
+</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_passed.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_passed.svg
new file mode 100644 (file)
index 0000000..12bc820
--- /dev/null
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128px" height="96px">
+       <path fill="#fff" d="M328.4 259.5H21.5C10.9 259.5 2 250.8 2 240V21.9C2 11.3 10.7 2.4 21.5 2.4h307.1c10.6 0 19.5 8.7 19.5 19.5V240c-.2 10.8-8.8 19.5-19.7 19.5z"/>
+       <path fill="#cfd3d7" d="M328.4 260.4H21.5c-11.2 0-20.4-9.2-20.4-20.4V21.9c0-11.2 9-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4V240c-.2 11.2-9.2 20.4-20.6 20.4zM21.5 3.3c-10.3 0-18.6 8.3-18.6 18.6V240c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V21.9c0-10.3-8.3-18.6-18.6-18.6H21.5z"/>
+       <path fill="#434447" d="M94.9 54.1c0 2.7-.4 5-1.3 7-.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.4 1.3-6.7 0-11.1-4.6-11.1-11.4 0-6.9 4.7-11.9 12-11.9 2.4 0 4.5.6 5.6 1.2l-.9 3.1c-1-.6-2.5-1.1-4.7-1.1-5.1 0-7.9 3.8-7.9 8.4 0 5.2 3.3 8.3 7.7 8.3 2.3 0 3.8-.6 5-1.1l.7 3.2zM170.9 189.4h4.1v32.7h-4.1v-32.7zM200.1 210.8c0 8.3-5.7 11.9-11.1 11.9-6 0-10.7-4.4-10.7-11.5 0-7.5 4.9-11.9 11.1-11.9 6.4 0 10.7 4.7 10.7 11.5zm-17.7.2c0 4.9 2.8 8.6 6.8 8.6 3.9 0 6.8-3.6 6.8-8.7 0-3.8-1.9-8.6-6.7-8.6-4.8.1-6.9 4.5-6.9 8.7zM222.1 216c0 2.3 0 4.3.2 6.1h-3.6l-.2-3.6h-.1c-1.1 1.8-3.4 4.2-7.4 4.2-3.5 0-7.7-1.9-7.7-9.8v-13.1h4.1v12.4c0 4.2 1.3 7.1 5 7.1 2.7 0 4.6-1.9 5.3-3.7.2-.6.4-1.3.4-2.1v-13.7h4.1V216h-.1zM246.2 189.4v27c0 2 0 4.2.2 5.8h-3.6l-.2-3.9h-.1c-1.2 2.5-4 4.4-7.6 4.4-5.4 0-9.5-4.6-9.5-11.3 0-7.4 4.6-12 10-12 3.4 0 5.7 1.6 6.7 3.4h.1v-13.3l4-.1zm-4 19.5c0-.5 0-1.2-.2-1.7-.6-2.6-2.8-4.7-5.9-4.7-4.2 0-6.7 3.7-6.7 8.6 0 4.5 2.2 8.3 6.6 8.3 2.7 0 5.2-1.8 5.9-4.8.1-.6.2-1.1.2-1.8l.1-3.9z"/>
+       </g>
+</svg>
\ No newline at end of file
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_warn.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_warn.svg
new file mode 100644 (file)
index 0000000..48e4d35
--- /dev/null
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 262.5" width="128px" height="96px">
+       <path fill="#fff" d="M328.4 259.5H21.3c-10.6 0-19.5-8.7-19.5-19.5V22c0-10.6 8.7-19.5 19.5-19.5h307.1c10.6 0 19.5 8.7 19.5 19.5v218c0 10.8-8.9 19.5-19.5 19.5z"/>
+       <path fill="#cfd3d7" d="M328.4 260.4H21.3C10.1 260.4.9 251.2.9 240V22c0-11.2 9.2-20.4 20.4-20.4h307.1c11.2 0 20.4 9.2 20.4 20.4v218c0 11.2-9.3 20.4-20.4 20.4zM21.3 3.4C11 3.4 2.7 11.7 2.7 22v218c0 10.3 8.3 18.6 18.6 18.6h307.1c10.3 0 18.6-8.3 18.6-18.6V22c0-10.3-8.3-18.6-18.6-18.6H21.3z"/>
+       <path fill="#434447" d="M94.9 54.3c0 2.7-.4 5-1.3 7-.9 1.9-2.1 3.5-3.6 4.6l5 3.9-2.5 2.2-5.9-4.7c-.9.2-1.9.3-2.9.3-2.2 0-4.1-.5-5.8-1.6-1.7-1.1-3-2.6-3.9-4.6s-1.4-4.3-1.4-6.9v-2c0-2.7.5-5 1.4-7.1s2.2-3.6 3.9-4.7 3.6-1.6 5.8-1.6c2.2 0 4.2.5 5.9 1.6 1.7 1.1 3 2.6 3.9 4.7.9 2 1.4 4.4 1.4 7.1v1.8zm-3.6-1.8c0-3.3-.7-5.8-2-7.6s-3.2-2.7-5.6-2.7c-2.3 0-4.1.9-5.5 2.6-1.3 1.8-2 4.2-2.1 7.4v2c0 3.2.7 5.7 2 7.5s3.2 2.8 5.6 2.8 4.2-.9 5.5-2.6c1.3-1.7 2-4.2 2-7.4l.1-2zM112.8 65.3c-1.4 1.6-3.4 2.4-6.1 2.4-2.2 0-3.9-.6-5-1.9-1.2-1.3-1.7-3.2-1.7-5.7V46.6h3.5V60c0 3.1 1.3 4.7 3.8 4.7 2.7 0 4.5-1 5.4-3v-15h3.5v20.7h-3.4v-2.1zM134.4 67.3c-.2-.4-.4-1.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.8.9 6.3 2.7s2.2 4.3 2.2 7.6V58h-14c.1 2 .6 3.7 1.8 4.9 1.1 1.3 2.6 1.9 4.3 1.9 1.2 0 2.3-.3 3.2-.8.9-.5 1.6-1.2 2.3-2l2.2 1.7c-1.9 2.7-4.5 4-8 4zm-.4-18.6c-1.4 0-2.6.5-3.6 1.6-1 1-1.6 2.5-1.8 4.4h10.4v-.3c-.1-1.8-.6-3.2-1.5-4.2s-2.1-1.5-3.5-1.5z"/>
+       <g>
+               <path fill="#ed7d20" d="M227.6 162.9H120.4c-17.6 0-31.9-14.4-31.9-31.9 0-17.6 14.4-31.9 31.9-31.9h107.2c17.6 0 31.9 14.4 31.9 31.9 0 17.6-14.3 31.9-31.9 31.9z"/>
+               <path fill="#fff" d="M139.1 136.9l4.1-21.6h6.2l-6.7 30.3h-6.3l-4.9-20.3-4.9 20.3h-6.3l-6.7-30.3h6.2l4.1 21.5 5-21.5h5.3l4.9 21.6zM169 139.4h-11l-2.1 6.2h-6.6l11.3-30.3h5.8l11.4 30.3h-6.6l-2.2-6.2zm-9.3-5h7.6l-3.8-11.4-3.8 11.4zM191.8 134.6h-5v11.1h-6.2v-30.3h11.3c3.6 0 6.3.8 8.3 2.4 1.9 1.6 2.9 3.9 2.9 6.8 0 2.1-.4 3.8-1.3 5.2-.9 1.4-2.3 2.5-4.1 3.3l6.6 12.4v.3h-6.7l-5.8-11.2zm-5-5.1h5c1.6 0 2.8-.4 3.6-1.2.9-.8 1.3-1.9 1.3-3.3s-.4-2.6-1.2-3.4c-.8-.8-2.1-1.2-3.7-1.2h-5v9.1zM232.5 145.7h-6.2l-12.2-20v20h-6.2v-30.3h6.2l12.2 20v-20h6.2v30.3z"/>
+       </g>
+       <g id="SonarCloud_Black">
+               <path fill="#f3702a" d="M302.5 204.3c-1.6-1.9-3.7-3.3-6-4v-.1c0-6.9-5.6-12.5-12.5-12.5s-12.5 5.6-12.5 12.5v.2c-5.1 1.6-8.8 6.3-8.8 11.9 0 6.9 5.6 12.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.2-3.6h-.1c-1.1 1.8-3.4 4.2-7.4 4.2-3.5 0-7.7-1.9-7.7-9.8v-13.1h4.1v12.4c0 4.2 1.3 7.1 5 7.1 2.7 0 4.6-1.9 5.3-3.7.2-.6.4-1.3.4-2.1v-13.7h4.1V216h-.1zM246.2 189.4v27c0 2 0 4.2.2 5.8h-3.6l-.2-3.9h-.1c-1.2 2.5-4 4.4-7.6 4.4-5.4 0-9.5-4.6-9.5-11.3 0-7.4 4.6-12 10-12 3.4 0 5.7 1.6 6.7 3.4h.1v-13.3l4-.1zm-4 19.5c0-.5 0-1.2-.2-1.7-.6-2.6-2.8-4.7-5.9-4.7-4.2 0-6.7 3.7-6.7 8.6 0 4.5 2.2 8.3 6.6 8.3 2.7 0 5.2-1.8 5.9-4.8.1-.6.2-1.1.2-1.8l.1-3.9z"/>
+       </g>
+</svg>
\ No newline at end of file
index 034441c567d72b9e8ae0884595b55aedd9e6501e..1f1f9e00f119eaed4da92fae5bb6443091e9642b 100644 (file)
@@ -26,6 +26,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
+import org.sonar.api.config.internal.MapSettings;
 import org.sonar.api.measures.CoreMetrics;
 import org.sonar.api.measures.Metric.Level;
 import org.sonar.api.server.ws.WebService;
@@ -70,8 +71,10 @@ public class MeasureActionTest {
   @Rule
   public DbTester db = DbTester.create();
 
+  private MapSettings mapSettings = new MapSettings().setProperty("sonar.sonarcloud.enabled", false);
+
   private WsActionTester ws = new WsActionTester(
-    new MeasureAction(userSession, db.getDbClient(), new ComponentFinder(db.getDbClient(), null), new SvgGenerator()));
+    new MeasureAction(userSession, db.getDbClient(), new ComponentFinder(db.getDbClient(), null), new SvgGenerator(mapSettings.asConfig())));
 
   @Test
   public void int_measure() {
index 0b6f717b2c0a07adcbc1e9ca92bc66ded7efb7d3..856b0c7dc8b3269548e80a2347267f04c35d25f9 100644 (file)
@@ -20,7 +20,6 @@
 package org.sonar.server.badge.ws;
 
 import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
 import org.sonar.core.platform.ComponentContainer;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -29,25 +28,13 @@ import static org.sonar.core.platform.ComponentContainer.COMPONENTS_IN_EMPTY_COM
 public class ProjectBadgesWsModuleTest {
 
   private ComponentContainer container = new ComponentContainer();
-  private MapSettings mapSettings = new MapSettings();
-  private ProjectBadgesWsModule underTest = new ProjectBadgesWsModule(mapSettings.asConfig());
+  private ProjectBadgesWsModule underTest = new ProjectBadgesWsModule();
 
   @Test
   public void verify_count_of_added_components() {
-    mapSettings.setProperty("sonar.sonarcloud.enabled", true);
-
     underTest.configure(container);
 
     assertThat(container.size()).isEqualTo(COMPONENTS_IN_EMPTY_COMPONENT_CONTAINER + 4);
   }
 
-  @Test
-  public void no_component_when_not_on_sonar_cloud() {
-    mapSettings.setProperty("sonar.sonarcloud.enabled", false);
-
-    underTest.configure(container);
-
-    assertThat(container.size()).isEqualTo(COMPONENTS_IN_EMPTY_COMPONENT_CONTAINER);
-  }
-
 }
index 2071e6c2c6f4a71b36de82b51ee605fde97e7a7d..5b9d0c94fecdc5492e075e76e0d8fb79fc9aad35 100644 (file)
@@ -24,6 +24,7 @@ import org.apache.commons.io.IOUtils;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
+import org.sonar.api.config.internal.MapSettings;
 import org.sonar.api.measures.Metric.Level;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.api.server.ws.WebService.Param;
@@ -55,8 +56,10 @@ public class QualityGateActionTest {
   @Rule
   public DbTester db = DbTester.create();
 
+  private MapSettings mapSettings = new MapSettings().setProperty("sonar.sonarcloud.enabled", false);
+
   private WsActionTester ws = new WsActionTester(
-    new QualityGateAction(userSession, db.getDbClient(), new ComponentFinder(db.getDbClient(), null), new SvgGenerator()));
+    new QualityGateAction(userSession, db.getDbClient(), new ComponentFinder(db.getDbClient(), null), new SvgGenerator(mapSettings.asConfig())));
 
   @Test
   public void quality_gate_passed() {
@@ -217,7 +220,7 @@ public class QualityGateActionTest {
 
   private String readTemplate(String template) {
     try {
-      return IOUtils.toString(getClass().getResource("templates/" + template), UTF_8);
+      return IOUtils.toString(getClass().getResource("templates/sonarqube/" + template), UTF_8);
     } catch (IOException e) {
       throw new IllegalStateException(String.format("Can't read svg template '%s'", template), e);
     }
index 3e9f23f0a60086e3374aa6e0ec2b5748c9b2a3ee..cc47c83535037904d9b01a6532c4a88d607b8239 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * SonarQube
- * Copyright (C) 2009-2018 SonarSource SA
+ * Copyright (C) 2009-2017 SonarSource SA
  * mailto:info AT sonarsource DOT com
  *
  * This program is free software; you can redistribute it and/or
@@ -43,10 +43,9 @@ public class ProjectBadgesTest {
   private static final String WS_MEASURE_BADGES_ON_QUALITY_GATE = "api/project_badges/measure?project=" + PROJECT_KEY + "&metric=alert_status";
   private static final String WS_MEASURE_BADGES_ON_BUGS = "api/project_badges/measure?project=" + PROJECT_KEY + "&metric=bugs";
   private static final String WS_QUALITY_GATE_BADGE = "api/project_badges/quality_gate?project=" + PROJECT_KEY;
-  private static final String SONAR_CLOUD_ORANGE_BADGE = "images/project_badges/sonarcloud-orange.svg";
 
   @ClassRule
-  public static Orchestrator orchestrator = SonarCloudProjectSuite.ORCHESTRATOR;
+  public static Orchestrator orchestrator = ProjectSuite.ORCHESTRATOR;
 
   @Rule
   public Tester tester = new Tester(orchestrator);
@@ -57,7 +56,7 @@ public class ProjectBadgesTest {
     tester.openBrowser("/projects").openProjectDashboard(PROJECT_KEY);
 
     SelenideElement badgesModal = openBadgesModal();
-    ElementsCollection badgeButtons = badgesModal.$$(".badge-button").shouldHaveSize(3);
+    ElementsCollection badgeButtons = badgesModal.$$(".badge-button").shouldHaveSize(2);
 
     // Check quality gate badge
     shouldHaveUrl(badgesModal, WS_MEASURE_BADGES_ON_QUALITY_GATE);
@@ -69,11 +68,6 @@ public class ProjectBadgesTest {
     // Check marketing quality gate badge
     badgeButtons.get(1).click();
     shouldHaveUrl(badgesModal, WS_QUALITY_GATE_BADGE);
-
-    // Check scanned on SonarCloud badge
-    badgeButtons.get(2).click();
-    selectOption("Orange");
-    shouldHaveUrl(badgesModal, SONAR_CLOUD_ORANGE_BADGE);
   }
 
   @Test
@@ -96,7 +90,6 @@ public class ProjectBadgesTest {
     assertThat(tester.wsClient().wsConnector().call(new GetRequest(WS_MEASURE_BADGES_ON_QUALITY_GATE)).failIfNotSuccessful().contentType()).isEqualTo("image/svg+xml");
     assertThat(tester.wsClient().wsConnector().call(new GetRequest(WS_MEASURE_BADGES_ON_BUGS)).failIfNotSuccessful().contentType()).isEqualTo("image/svg+xml");
     assertThat(tester.wsClient().wsConnector().call(new GetRequest(WS_QUALITY_GATE_BADGE)).failIfNotSuccessful().contentType()).isEqualTo("image/svg+xml");
-    assertThat(tester.wsClient().wsConnector().call(new GetRequest(SONAR_CLOUD_ORANGE_BADGE)).failIfNotSuccessful().contentType()).isEqualTo("image/svg+xml");
   }
 
   private void shouldNotHaveBadges() {
index eaf2ba850be036fa209e3682e606f2c5907398be..b16447be77956b3e8b949c3a2392f8c4de550a62 100644 (file)
@@ -32,6 +32,7 @@ import static util.ItUtils.xooPlugin;
 
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
+  ProjectBadgesTest.class,
   ProjectBulkDeletionTest.class,
   ProjectBulkDeletionPageTest.class,
   ProjectDeletionTest.class,
diff --git a/tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectBadgesTest.java b/tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectBadgesTest.java
new file mode 100644 (file)
index 0000000..87833c3
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonarqube.tests.project;
+
+import com.codeborne.selenide.Condition;
+import com.codeborne.selenide.ElementsCollection;
+import com.codeborne.selenide.SelenideElement;
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.build.SonarScanner;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.sonarqube.qa.util.Tester;
+import org.sonarqube.ws.Organizations.Organization;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.projects.UpdateVisibilityRequest;
+
+import static com.codeborne.selenide.Selenide.$;
+import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.projectDir;
+
+public class SonarCloudProjectBadgesTest {
+
+  private static final String PROJECT_KEY = "sample";
+  private static final String WS_MEASURE_BADGES_ON_QUALITY_GATE = "api/project_badges/measure?project=" + PROJECT_KEY + "&metric=alert_status";
+  private static final String WS_MEASURE_BADGES_ON_BUGS = "api/project_badges/measure?project=" + PROJECT_KEY + "&metric=bugs";
+  private static final String WS_QUALITY_GATE_BADGE = "api/project_badges/quality_gate?project=" + PROJECT_KEY;
+  private static final String SONAR_CLOUD_ORANGE_BADGE = "images/project_badges/sonarcloud-orange.svg";
+
+  @ClassRule
+  public static Orchestrator orchestrator = SonarCloudProjectSuite.ORCHESTRATOR;
+
+  @Rule
+  public Tester tester = new Tester(orchestrator);
+
+  @Test
+  public void public_project_badges() {
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
+    tester.openBrowser("/projects").openProjectDashboard(PROJECT_KEY);
+
+    SelenideElement badgesModal = openBadgesModal();
+    ElementsCollection badgeButtons = badgesModal.$$(".badge-button").shouldHaveSize(3);
+
+    // Check quality gate badge
+    shouldHaveUrl(badgesModal, WS_MEASURE_BADGES_ON_QUALITY_GATE);
+
+    // Check bugs badge
+    selectOption("Bugs");
+    shouldHaveUrl(badgesModal, WS_MEASURE_BADGES_ON_BUGS);
+
+    // Check marketing quality gate badge
+    badgeButtons.get(1).click();
+    shouldHaveUrl(badgesModal, WS_QUALITY_GATE_BADGE);
+
+    // Check scanned on SonarCloud badge
+    badgeButtons.get(2).click();
+    selectOption("Orange");
+    shouldHaveUrl(badgesModal, SONAR_CLOUD_ORANGE_BADGE);
+  }
+
+  @Test
+  public void private_project_do_not_have_badges() {
+    Organization org = tester.organizations().generate();
+    User user = tester.users().generateAdministrator(org);
+    orchestrator.executeBuild(
+      SonarScanner
+        .create(projectDir("shared/xoo-sample"))
+        .setProperties("sonar.organization", org.getKey(), "sonar.login", user.getLogin(), "sonar.password", user.getLogin())
+    );
+    tester.wsClient().projects().updateVisibility(new UpdateVisibilityRequest().setProject("sample").setVisibility("private"));
+    tester.openBrowser("/projects").logIn().submitCredentials(user.getLogin()).openProjectDashboard(PROJECT_KEY);
+    shouldNotHaveBadges();
+  }
+
+  @Test
+  public void project_badges_ws() {
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
+    assertThat(tester.wsClient().wsConnector().call(new GetRequest(WS_MEASURE_BADGES_ON_QUALITY_GATE)).failIfNotSuccessful().contentType()).isEqualTo("image/svg+xml");
+    assertThat(tester.wsClient().wsConnector().call(new GetRequest(WS_MEASURE_BADGES_ON_BUGS)).failIfNotSuccessful().contentType()).isEqualTo("image/svg+xml");
+    assertThat(tester.wsClient().wsConnector().call(new GetRequest(WS_QUALITY_GATE_BADGE)).failIfNotSuccessful().contentType()).isEqualTo("image/svg+xml");
+    assertThat(tester.wsClient().wsConnector().call(new GetRequest(SONAR_CLOUD_ORANGE_BADGE)).failIfNotSuccessful().contentType()).isEqualTo("image/svg+xml");
+  }
+
+  private void shouldNotHaveBadges() {
+    $(".js-project-badges").shouldNot(Condition.exist);
+  }
+
+  private SelenideElement openBadgesModal() {
+    $(".js-project-badges").shouldBe(Condition.visible).click();
+    return $(".modal-body").shouldBe(Condition.visible);
+  }
+
+  private void selectOption(String option) {
+    SelenideElement select = $(".Select").should(Condition.visible);
+    select.click();
+    select.$$(".Select-option").find(Condition.text(option)).should(Condition.exist).click();
+  }
+
+  private void shouldHaveUrl(SelenideElement badgesModal, String url) {
+    badgesModal.$(".code-snippet pre")
+      .shouldBe(Condition.visible)
+      .shouldHave(Condition.text(url));
+  }
+}
index d65f7b52c37d93c6ea29f8e5c54d76eabd82c67d..af9aba43eea8b074436cb0398616281f2d581f9e 100644 (file)
@@ -29,7 +29,7 @@ import static util.ItUtils.xooPlugin;
 
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
-  ProjectBadgesTest.class
+  SonarCloudProjectBadgesTest.class
 })
 public class SonarCloudProjectSuite {