From aa237a8224a408e4764f25a93c4e9debf8c28ac4 Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Fri, 21 Feb 2020 11:32:21 +0100 Subject: [PATCH] SONAR-13033 Add donut chart to overview --- .../overview/branches/SecurityHotspotsReviewed.tsx | 6 +++++- .../SecurityHotspotsReviewed-test.tsx.snap | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) 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% -- 2.39.5