From f34b192c12afc5987ff24787d7a008ff2605d92d Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 3 Oct 2017 18:28:30 +0200 Subject: [PATCH] SONAR-9522 Change the duplication perspective's graph axis --- server/sonar-web/src/main/js/apps/projects/utils.ts | 2 +- .../src/main/js/apps/projects/visualizations/Duplications.tsx | 2 +- .../__tests__/__snapshots__/Duplications-test.tsx.snap | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projects/utils.ts b/server/sonar-web/src/main/js/apps/projects/utils.ts index 30f46344a6f..ab50c3fded6 100644 --- a/server/sonar-web/src/main/js/apps/projects/utils.ts +++ b/server/sonar-web/src/main/js/apps/projects/utils.ts @@ -118,7 +118,7 @@ const METRICS_BY_VISUALIZATION: { [x: string]: string[] } = { security: ['ncloc', 'security_remediation_effort', 'vulnerabilities', 'security_rating'], maintainability: ['ncloc', 'sqale_index', 'code_smells', 'sqale_rating'], coverage: ['complexity', 'coverage', 'uncovered_lines'], - duplications: ['ncloc', 'duplicated_lines', 'duplicated_blocks'] + duplications: ['ncloc', 'duplicated_lines_density', 'duplicated_blocks'] }; const FACETS = [ diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx index 2e6c05b0dc9..64b91b584f9 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx @@ -31,7 +31,7 @@ export default function Duplications(props: Props) { ); diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/__snapshots__/Duplications-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/__snapshots__/Duplications-test.tsx.snap index dca1cdc0b05..c3920375a20 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/__snapshots__/Duplications-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/__snapshots__/Duplications-test.tsx.snap @@ -18,8 +18,8 @@ exports[`renders 1`] = ` } yMetric={ Object { - "key": "duplicated_lines", - "type": "SHORT_INT", + "key": "duplicated_lines_density", + "type": "PERCENT", } } /> -- 2.39.5