aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-06-16 14:44:00 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-04 14:15:34 +0200
commit8ae7fe42c14b649dd634798c3768c3b95bd5b63f (patch)
tree7c0376df70763ff4d002ecc67ac90e7c56a1e85b /server/sonar-web/src/main
parentb70ce44a8dd8d1411bdbe9774e72176c8954b9bc (diff)
downloadsonarqube-8ae7fe42c14b649dd634798c3768c3b95bd5b63f.tar.gz
sonarqube-8ae7fe42c14b649dd634798c3768c3b95bd5b63f.zip
SONAR-9401 Add the duplications graph to the project activity page
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.js2
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/utils.js5
2 files changed, 4 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)}
/>
</div>
);
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 => {