summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/monitoring/constants.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 21:07:56 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 21:07:56 +0000
commit0e68afab211a172b862a7acc774e1eda5da8e471 (patch)
tree1eba04a16582c9183d4f479f82dd8709ae40d72f /app/assets/javascripts/monitoring/constants.js
parent33aa02e7a38d8dfc5e470dd5d776c8d4ce5b2dd5 (diff)
downloadgitlab-ce-0e68afab211a172b862a7acc774e1eda5da8e471.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/monitoring/constants.js')
-rw-r--r--app/assets/javascripts/monitoring/constants.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/assets/javascripts/monitoring/constants.js b/app/assets/javascripts/monitoring/constants.js
index f9a911ddf03..3990a8d1f61 100644
--- a/app/assets/javascripts/monitoring/constants.js
+++ b/app/assets/javascripts/monitoring/constants.js
@@ -79,3 +79,28 @@ export const dateFormats = {
timeOfDay: 'h:MM TT',
default: 'dd mmm yyyy, h:MMTT',
};
+
+/**
+ * These Vuex store properties are allowed to be
+ * replaced dynamically after component has been created
+ * and initial state has been set.
+ *
+ * Currently used in `receiveMetricsDashboardSuccess` action.
+ */
+export const endpointKeys = [
+ 'metricsEndpoint',
+ 'deploymentsEndpoint',
+ 'dashboardEndpoint',
+ 'dashboardsEndpoint',
+ 'currentDashboard',
+ 'projectPath',
+ 'logsPath',
+];
+
+/**
+ * These Vuex store properties are set as soon as the
+ * dashboard component has been created. The values are
+ * passed as data-* attributes and received by dashboard
+ * as Vue props.
+ */
+export const initialStateKeys = [...endpointKeys, 'currentEnvironmentName'];