From 8ae7fe42c14b649dd634798c3768c3b95bd5b63f Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Fri, 16 Jun 2017 14:44:00 +0200 Subject: SONAR-9401 Add the duplications graph to the project activity page --- .../main/js/apps/projectActivity/components/ProjectActivityGraphs.js | 2 +- server/sonar-web/src/main/js/apps/projectActivity/utils.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'server/sonar-web/src/main') 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 => { -- cgit v1.2.3