]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9522 Change the duplication perspective's graph axis
authorStas Vilchik <stas.vilchik@sonarsource.com>
Tue, 3 Oct 2017 16:28:30 +0000 (18:28 +0200)
committerStas Vilchik <stas.vilchik@sonarsource.com>
Wed, 4 Oct 2017 08:35:13 +0000 (10:35 +0200)
server/sonar-web/src/main/js/apps/projects/utils.ts
server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx
server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/__snapshots__/Duplications-test.tsx.snap

index 30f46344a6ff6ccd31e249c0c2c7c3108b6a145e..ab50c3fded693dd4f4e057ffaf875033dd1fc647 100644 (file)
@@ -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 = [
index 2e6c05b0dc9490d2a59fb808efb18cf954ec3c8f..64b91b584f9242ba85676099d992c8a84498a927 100644 (file)
@@ -31,7 +31,7 @@ export default function Duplications(props: Props) {
     <SimpleBubbleChart
       {...props}
       xMetric={{ key: 'ncloc', type: 'SHORT_INT' }}
-      yMetric={{ key: 'duplicated_lines', type: 'SHORT_INT' }}
+      yMetric={{ key: 'duplicated_lines_density', type: 'PERCENT' }}
       sizeMetric={{ key: 'duplicated_blocks', type: 'SHORT_INT' }}
     />
   );
index dca1cdc0b0512a57dd87ed0889dca18f2e774768..c3920375a20ec2fedb9fee85d1e598d3dd9c53a2 100644 (file)
@@ -18,8 +18,8 @@ exports[`renders 1`] = `
   }
   yMetric={
     Object {
-      "key": "duplicated_lines",
-      "type": "SHORT_INT",
+      "key": "duplicated_lines_density",
+      "type": "PERCENT",
     }
   }
 />