aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/SecurityHotspotsReviewed-test.tsx.snap10
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 ? (
<span aria-label={translate('no_data')} className="overview-measures-empty-value" />
) : (
- <span className="huge">{formatMeasure(value, 'PERCENT')}</span>
+ <>
+ <CoverageRating value={value} />
+ <span className="huge spacer-left">{formatMeasure(value, 'PERCENT')}</span>
+ </>
)}
<span className="big-spacer-left">
{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`] = `
<Fragment>
+ <CoverageRating
+ value="1.0"
+ />
<span
- className="huge"
+ className="huge spacer-left"
>
1.0%
</span>
@@ -31,8 +34,11 @@ exports[`should render correctly: no measures 1`] = `
exports[`should render correctly: on new code 1`] = `
<Fragment>
+ <CoverageRating
+ value="1.0"
+ />
<span
- className="huge"
+ className="huge spacer-left"
>
1.0%
</span>