From 8ae7fe42c14b649dd634798c3768c3b95bd5b63f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Fri, 16 Jun 2017 14:44:00 +0200 Subject: [PATCH] SONAR-9401 Add the duplications graph to the project activity page --- .../apps/projectActivity/components/ProjectActivityGraphs.js | 2 +- server/sonar-web/src/main/js/apps/projectActivity/utils.js | 5 +++-- sonar-core/src/main/resources/org/sonar/l10n/core.properties | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) 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 -- 2.39.5