From 544c4c57a45afbea604cf0cf02eeb268f59565e6 Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Fri, 21 Jul 2017 11:38:41 +0200 Subject: Rename project activity graph Overview to Issues --- server/sonar-web/src/main/js/apps/projectActivity/utils.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/projectActivity/utils.js') 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): 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']), -- cgit v1.2.3