From: Grégoire Aubert Date: Mon, 22 Jan 2018 09:19:53 +0000 (+0100) Subject: SONAR-10266 Update svg templates and metrics list X-Git-Tag: 7.5~1775 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b56784c3752c5742aed9bf66e307e6ab14c3080f;p=sonarqube.git SONAR-10266 Update svg templates and metrics list --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/badge/ws/MeasureAction.java b/server/sonar-server/src/main/java/org/sonar/server/badge/ws/MeasureAction.java index 44d1b3fbc2d..08cf30bae79 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/badge/ws/MeasureAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/badge/ws/MeasureAction.java @@ -54,8 +54,8 @@ import static org.sonar.api.measures.CoreMetrics.RELIABILITY_RATING_KEY; import static org.sonar.api.measures.CoreMetrics.SECURITY_RATING_KEY; import static org.sonar.api.measures.CoreMetrics.SQALE_RATING_KEY; import static org.sonar.api.measures.CoreMetrics.TECHNICAL_DEBT_KEY; -import static org.sonar.api.measures.CoreMetrics.TESTS_KEY; import static org.sonar.api.measures.CoreMetrics.VULNERABILITIES_KEY; +import static org.sonar.api.measures.CoreMetrics.NCLOC_KEY; import static org.sonar.api.measures.Metric.Level; import static org.sonar.api.measures.Metric.ValueType; import static org.sonar.api.measures.Metric.Level.ERROR; @@ -82,17 +82,17 @@ public class MeasureAction implements ProjectBadgesWsAction { private static final String PARAM_METRIC = "metric"; private static final Map METRIC_NAME_BY_KEY = ImmutableMap.builder() - .put(ALERT_STATUS_KEY, "quality gate") - .put(COVERAGE_KEY, "coverage") - .put(RELIABILITY_RATING_KEY, "reliability") - .put(SECURITY_RATING_KEY, "security") - .put(SQALE_RATING_KEY, "maintainability") .put(BUGS_KEY, "bugs") - .put(VULNERABILITIES_KEY, "vulnerabilities") .put(CODE_SMELLS_KEY, "code smells") + .put(COVERAGE_KEY, "coverage") .put(DUPLICATED_LINES_DENSITY_KEY, "duplicated lines") + .put(NCLOC_KEY, "lines of code") + .put(SQALE_RATING_KEY, "maintainability") + .put(ALERT_STATUS_KEY, "quality gate") + .put(RELIABILITY_RATING_KEY, "reliability") + .put(SECURITY_RATING_KEY, "security") .put(TECHNICAL_DEBT_KEY, "technical debt") - .put(TESTS_KEY, "unit tests") + .put(VULNERABILITIES_KEY, "vulnerabilities") .build(); private static final Map QUALITY_GATE_MESSAGE_BY_STATUS = new EnumMap<>(ImmutableMap.of( diff --git a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/quality_gate-example.svg b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/quality_gate-example.svg index 06cba700093..12bc8205ff8 100644 --- a/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/quality_gate-example.svg +++ b/server/sonar-server/src/main/resources/org/sonar/server/badge/ws/quality_gate-example.svg @@ -1,115 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + \ 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 index 010e1fef5b7..a83f9c79d62 100644 --- 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 @@ -1,104 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - + + - - + + + + + \ 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 index 06cba700093..12bc8205ff8 100644 --- 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 @@ -1,115 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + \ 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 index f43ca6404a5..48e4d353950 100644 --- 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 @@ -1,107 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - + + - - - - - - - - + + + + + \ No newline at end of file diff --git a/server/sonar-web/src/main/js/apps/overview/badges/BadgeParams.tsx b/server/sonar-web/src/main/js/apps/overview/badges/BadgeParams.tsx index fc9a9db4554..e6bce97e5d1 100644 --- a/server/sonar-web/src/main/js/apps/overview/badges/BadgeParams.tsx +++ b/server/sonar-web/src/main/js/apps/overview/badges/BadgeParams.tsx @@ -38,6 +38,7 @@ interface State { export default class BadgeParams extends React.PureComponent { mounted: boolean; + state: State = { badgeMetrics: [] }; componentDidMount() { diff --git a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-black.svg b/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-black.svg index 81d55ae77a3..1ff05edc822 100644 --- a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-black.svg +++ b/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-black.svg @@ -1,4 +1,4 @@ - + diff --git a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-orange.svg b/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-orange.svg index 20ea73bcb72..1a53be8e449 100644 --- a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-orange.svg +++ b/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-orange.svg @@ -1,4 +1,4 @@ - + diff --git a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-white.svg b/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-white.svg index f18a5507e9f..475ef13f68e 100644 --- a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-white.svg +++ b/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-white.svg @@ -1,4 +1,4 @@ - + diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 1b429d48c9b..a02889ca614 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1913,7 +1913,7 @@ global_permissions.permission=Permission global_permissions.users=Users global_permissions.groups=Groups global_permissions.admin=Administer System -global_permissions.admin.desc=Ability to perform all administration functions for the instance: global configuration and customization of default dashboards. +global_permissions.admin.desc=Ability to perform all administration functions for the instance. global_permissions.profileadmin=Administer Quality Profiles global_permissions.profileadmin.desc=Ability to perform any action on quality profiles. global_permissions.gateadmin=Administer Quality Gates