Commit f2c6c48f authored by Tristan Read's avatar Tristan Read Committed by Sean Arnold

Make store conditional and fix lint errors

parent a8bc72f3
......@@ -11,13 +11,12 @@ import {
GlButton,
GlSafeHtmlDirective,
} from '@gitlab/ui';
import { mapState, mapActions } from 'vuex';
import * as Sentry from '@sentry/browser';
import highlightCurrentUser from '~/behaviors/markdown/highlight_current_user';
import { fetchPolicies } from '~/lib/graphql';
import { toggleContainerClasses } from '~/lib/utils/dom_utils';
import { visitUrl, joinPaths } from '~/lib/utils/url_utility';
import { __, s__ } from '~/locale';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
import initUserPopovers from '~/user_popovers';
import AlertDetailsTable from '~/vue_shared/components/alert_details_table.vue';
......
......@@ -63,18 +63,19 @@ export default (selector) => {
canUpdate: parseBoolean(canUpdate),
};
const opsProperties = {};
if (page === PAGE_CONFIG.OPERATIONS.TITLE) {
const { TRACK_ALERTS_DETAILS_VIEWS_OPTIONS, TRACK_ALERT_STATUS_UPDATE_OPTIONS } = PAGE_CONFIG[
page
];
provide.trackAlertsDetailsViewsOptions = TRACK_ALERTS_DETAILS_VIEWS_OPTIONS;
provide.trackAlertStatusUpdateOptions = TRACK_ALERT_STATUS_UPDATE_OPTIONS;
opsProperties.store = createStore({}, service);
} else if (page === PAGE_CONFIG.THREAT_MONITORING.TITLE) {
provide.isThreatMonitoringPage = true;
}
const store = createStore({}, service);
// eslint-disable-next-line no-new
new Vue({
el: selector,
......@@ -82,7 +83,7 @@ export default (selector) => {
components: {
AlertDetails,
},
store,
...opsProperties,
provide,
apolloProvider,
router,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment