aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projectActivity/utils.js
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-21 11:38:41 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-24 08:31:05 +0200
commit544c4c57a45afbea604cf0cf02eeb268f59565e6 (patch)
tree5ce00b2fbbc7077e90fd0b7338e89047719d8c24 /server/sonar-web/src/main/js/apps/projectActivity/utils.js
parent6182f01a60369b10bd0f5a2e065d7f844496da5b (diff)
downloadsonarqube-544c4c57a45afbea604cf0cf02eeb268f59565e6.tar.gz
sonarqube-544c4c57a45afbea604cf0cf02eeb268f59565e6.zip
Rename project activity graph Overview to Issues
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectActivity/utils.js')
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/utils.js11
1 files changed, 6 insertions, 5 deletions
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 d4b52b6df7e..49cec35fd5a 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/utils.js
+++ b/server/sonar-web/src/main/js/apps/projectActivity/utils.js
@@ -35,14 +35,15 @@ import type { RawQuery } from '../../helpers/query';
import type { Serie } from '../../components/charts/AdvancedTimeline';
export const EVENT_TYPES = ['VERSION', 'QUALITY_GATE', 'QUALITY_PROFILE', 'OTHER'];
-export const GRAPH_TYPES = ['overview', 'coverage', 'duplications', 'custom'];
+export const DEFAULT_GRAPH = 'issues';
+export const GRAPH_TYPES = ['issues', 'coverage', 'duplications', 'custom'];
export const GRAPHS_METRICS_DISPLAYED = {
- overview: ['bugs', 'code_smells', 'vulnerabilities'],
+ issues: ['bugs', 'code_smells', 'vulnerabilities'],
coverage: ['uncovered_lines', 'lines_to_cover'],
duplications: ['duplicated_lines', 'ncloc']
};
export const GRAPHS_METRICS = {
- overview: GRAPHS_METRICS_DISPLAYED['overview'].concat([
+ issues: GRAPHS_METRICS_DISPLAYED['issues'].concat([
'reliability_rating',
'security_rating',
'sqale_rating'
@@ -184,10 +185,10 @@ export const getHistoryMetrics = (graph: string, customMetrics: Array<string>):
const parseGraph = (value?: string): string => {
const graph = parseAsString(value);
- return GRAPH_TYPES.includes(graph) ? graph : 'overview';
+ return GRAPH_TYPES.includes(graph) ? graph : DEFAULT_GRAPH;
};
-const serializeGraph = (value: string): ?string => (value === 'overview' ? undefined : value);
+const serializeGraph = (value: string): ?string => (value === DEFAULT_GRAPH ? undefined : value);
export const parseQuery = (urlQuery: RawQuery): Query => ({
category: parseAsString(urlQuery['category']),