Browse Source

SONAR-9401 Add the duplications graph to the project activity page

tags/6.5-M2
Grégoire Aubert 7 years ago
parent
commit
8ae7fe42c1

+ 1
- 1
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.js View 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>
);

+ 3
- 2
server/sonar-web/src/main/js/apps/projectActivity/utils.js View 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 => {

+ 1
- 0
sonar-core/src/main/resources/org/sonar/l10n/core.properties View 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


Loading…
Cancel
Save