From: Jeremy Davis Date: Fri, 21 Feb 2020 10:32:21 +0000 (+0100) Subject: SONAR-13033 Add donut chart to overview X-Git-Tag: 8.2.0.32929~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aa237a8224a408e4764f25a93c4e9debf8c28ac4;p=sonarqube.git SONAR-13033 Add donut chart to overview --- diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx index e50ec18b938..6b8b6440a31 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx @@ -21,6 +21,7 @@ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { getLeakValue } from '../../../components/measure/utils'; +import CoverageRating from '../../../components/ui/CoverageRating'; import { findMeasure } from '../../../helpers/measures'; import { MetricKey } from '../../../types/metrics'; @@ -46,7 +47,10 @@ export default function SecurityHotspotsReviewed(props: SecurityHotspotsReviewed {value === undefined ? ( ) : ( - {formatMeasure(value, 'PERCENT')} + <> + + {formatMeasure(value, 'PERCENT')} + )} {translate('overview.measures.security_hotspots_reviewed')} diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/SecurityHotspotsReviewed-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/SecurityHotspotsReviewed-test.tsx.snap index 725abb11385..161d2b33878 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/SecurityHotspotsReviewed-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/SecurityHotspotsReviewed-test.tsx.snap @@ -2,8 +2,11 @@ exports[`should render correctly 1`] = ` + 1.0% @@ -31,8 +34,11 @@ exports[`should render correctly: no measures 1`] = ` exports[`should render correctly: on new code 1`] = ` + 1.0%