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:
Diffstat (limited to 'app/assets/javascripts/monitoring/stores/state.js')
-rw-r--r--app/assets/javascripts/monitoring/stores/state.js31
1 files changed, 28 insertions, 3 deletions
diff --git a/app/assets/javascripts/monitoring/stores/state.js b/app/assets/javascripts/monitoring/stores/state.js
index 8000f27c0d5..89738756ffe 100644
--- a/app/assets/javascripts/monitoring/stores/state.js
+++ b/app/assets/javascripts/monitoring/stores/state.js
@@ -1,5 +1,6 @@
import invalidUrl from '~/lib/utils/invalid_url';
import { timezones } from '../format_date';
+import { dashboardEmptyStates } from '../constants';
export default () => ({
// API endpoints
@@ -9,11 +10,24 @@ export default () => ({
// Dashboard request parameters
timeRange: null,
+ /**
+ * Currently selected dashboard. For custom dashboards,
+ * this could be the filename or the file path.
+ *
+ * If this is the filename and full path is required,
+ * getters.fullDashboardPath should be used.
+ */
currentDashboard: null,
// Dashboard data
- emptyState: 'gettingStarted',
- showEmptyState: true,
+ hasDashboardValidationWarnings: false,
+
+ /**
+ * {?String} If set, dashboard should display a global
+ * empty state, there is no way to interact (yet)
+ * with the dashboard.
+ */
+ emptyState: dashboardEmptyStates.GETTING_STARTED,
showErrorBanner: true,
isUpdatingStarredValue: false,
dashboard: {
@@ -39,7 +53,7 @@ export default () => ({
* User-defined custom variables are passed
* via the dashboard yml file.
*/
- variables: {},
+ variables: [],
/**
* User-defined custom links are passed
* via the dashboard yml file.
@@ -56,5 +70,16 @@ export default () => ({
// GitLab paths to other pages
projectPath: null,
+ operationsSettingsPath: '',
logsPath: invalidUrl,
+
+ // static paths
+ customDashboardBasePath: '',
+
+ // current user data
+ /**
+ * Flag that denotes if the currently logged user can access
+ * the project Settings -> Operations
+ */
+ canAccessOperationsSettings: false,
});