Commit c864d691 authored by Mark Florian's avatar Mark Florian

Consistently set dashboardType

parent d40497d7
......@@ -3,6 +3,7 @@ import createRouter from './store/router';
import projectSelector from './store/plugins/project_selector';
import syncWithRouter from './store/plugins/sync_with_router';
import createStore from './store';
import { DASHBOARD_TYPES } from './store/constants';
import InstanceSecurityDashboard from './components/instance_security_dashboard.vue';
export default () => {
......@@ -19,7 +20,10 @@ export default () => {
vulnerableProjectsEndpoint,
} = el.dataset;
const router = createRouter();
const store = createStore({ plugins: [projectSelector, syncWithRouter(router)] });
const store = createStore({
dashboardType: DASHBOARD_TYPES.INSTANCE,
plugins: [projectSelector, syncWithRouter(router)],
});
return new Vue({
el,
......
......@@ -2,6 +2,7 @@ import Vue from 'vue';
import createRouter from './store/router';
import syncWithRouter from './store/plugins/sync_with_router';
import createStore from './store';
import { DASHBOARD_TYPES } from './store/constants';
import ProjectSecurityDashboard from './components/project_security_dashboard.vue';
import { parseBoolean } from '~/lib/utils/common_utils';
......@@ -73,7 +74,10 @@ export default () => {
}
const router = createRouter();
const store = createStore({ plugins: [syncWithRouter(router)] });
const store = createStore({
dashboardType: DASHBOARD_TYPES.PROJECT,
plugins: [syncWithRouter(router)],
});
return new Vue({
el: securityTab,
......
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