From: Grégoire Aubert Date: Fri, 16 Jun 2017 12:44:00 +0000 (+0200) Subject: SONAR-9401 Add the duplications graph to the project activity page X-Git-Tag: 6.5-M2~52 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8ae7fe42c14b649dd634798c3768c3b95bd5b63f;p=sonarqube.git SONAR-9401 Add the duplications graph to the project activity page --- diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.js index 33413850128..c1088f8d7d8 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.js @@ -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)} /> ); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/utils.js b/server/sonar-web/src/main/js/apps/projectActivity/utils.js index 37da896d9d2..fe95ae971d4 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/utils.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/utils.js @@ -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 => { diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 86400201fbb..2cdf15fe1b5 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -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