]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9401 Add the duplications graph to the project activity page
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 16 Jun 2017 12:44:00 +0000 (14:44 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 4 Jul 2017 12:15:34 +0000 (14:15 +0200)
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.js
server/sonar-web/src/main/js/apps/projectActivity/utils.js
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 33413850128bdc9c2aca651813076583d62147b4..c1088f8d7d8a03dc8245cfdfa1055a488c0f61db 100644 (file)
@@ -47,7 +47,7 @@ export default function ProjectActivityGraphs(props: Props) {
         measuresHistory={props.measuresHistory}
         metricsType={props.metricsType}
         project={props.project}
-        showAreas={graph === 'coverage'}
+        showAreas={['coverage', 'duplications'].includes(graph)}
       />
     </div>
   );
index 37da896d9d2f812069c3877ab1a10610b38d4e39..fe95ae971d49e84c62623edf853400d0a4448026 100644 (file)
@@ -23,10 +23,11 @@ import { translate } from '../../helpers/l10n';
 import type { MeasureHistory, Query } from './types';
 import type { RawQuery } from '../../helpers/query';
 
-export const GRAPH_TYPES = ['overview', 'coverage'];
+export const GRAPH_TYPES = ['overview', 'coverage', 'duplications'];
 export const GRAPHS_METRICS = {
   overview: ['bugs', 'vulnerabilities', 'code_smells'],
-  coverage: ['uncovered_lines', 'lines_to_cover']
+  coverage: ['uncovered_lines', 'lines_to_cover'],
+  duplications: ['duplicated_lines', 'ncloc']
 };
 
 const parseGraph = (value?: string): string => {
index 86400201fbb940493b64959cd906e672d365e003..2cdf15fe1b5be7f5266933af595913dbe62ae96c 100644 (file)
@@ -1285,6 +1285,7 @@ project_activity.filter_events=Filter events
 
 project_activity.graphs.overview=Overview
 project_activity.graphs.coverage=Coverage
+project_activity.graphs.duplications=Duplications
 
 project_activity.custom_metric.covered_lines=Covered Lines