Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-02 15:09:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-02 15:09:59 +0300
commit3eec6c2511af2b10cd25be64dcd84c4a35a7bcdb (patch)
tree8af0733be4f7cb507353ed97ca8d6b4e9e374b7f /app/assets/javascripts/cycle_analytics
parent1930898566965dbc1bd779089ec9e58e17674268 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/cycle_analytics')
-rw-r--r--app/assets/javascripts/cycle_analytics/constants.js10
-rw-r--r--app/assets/javascripts/cycle_analytics/store/actions.js10
2 files changed, 15 insertions, 5 deletions
diff --git a/app/assets/javascripts/cycle_analytics/constants.js b/app/assets/javascripts/cycle_analytics/constants.js
index 755977f87df..a41a9ad989f 100644
--- a/app/assets/javascripts/cycle_analytics/constants.js
+++ b/app/assets/javascripts/cycle_analytics/constants.js
@@ -1,4 +1,4 @@
-import { s__ } from '~/locale';
+import { __, s__ } from '~/locale';
export const DEFAULT_DAYS_IN_PAST = 30;
export const DEFAULT_DAYS_TO_DISPLAY = 30;
@@ -22,3 +22,11 @@ export const PAGINATION_SORT_DIRECTION_ASC = 'asc';
export const STAGE_TITLE_STAGING = 'staging';
export const STAGE_TITLE_TEST = 'test';
+
+export const I18N_VSA_ERROR_STAGES = __(
+ 'There was an error fetching value stream analytics stages.',
+);
+export const I18N_VSA_ERROR_STAGE_MEDIAN = __('There was an error fetching median data for stages');
+export const I18N_VSA_ERROR_SELECTED_STAGE = __(
+ 'There was an error fetching data for the selected stage',
+);
diff --git a/app/assets/javascripts/cycle_analytics/store/actions.js b/app/assets/javascripts/cycle_analytics/store/actions.js
index 955f0c7271e..5a7dbbd28bb 100644
--- a/app/assets/javascripts/cycle_analytics/store/actions.js
+++ b/app/assets/javascripts/cycle_analytics/store/actions.js
@@ -7,7 +7,11 @@ import {
} from '~/api/analytics_api';
import createFlash from '~/flash';
import { __ } from '~/locale';
-import { DEFAULT_DAYS_TO_DISPLAY, DEFAULT_VALUE_STREAM } from '../constants';
+import {
+ DEFAULT_DAYS_TO_DISPLAY,
+ DEFAULT_VALUE_STREAM,
+ I18N_VSA_ERROR_STAGE_MEDIAN,
+} from '../constants';
import * as types from './mutation_types';
export const setSelectedValueStream = ({ commit, dispatch }, valueStream) => {
@@ -120,9 +124,7 @@ export const fetchStageMedians = ({
.then((data) => commit(types.RECEIVE_STAGE_MEDIANS_SUCCESS, data))
.catch((error) => {
commit(types.RECEIVE_STAGE_MEDIANS_ERROR, error);
- createFlash({
- message: __('There was an error fetching median data for stages'),
- });
+ createFlash({ message: I18N_VSA_ERROR_STAGE_MEDIAN });
});
};