debian-mirror-gitlab/app/assets/javascripts/monitoring/stores/index.js

30 lines
550 B
JavaScript
Raw Normal View History

2019-09-04 21:01:54 +05:30
import Vue from 'vue';
import Vuex from 'vuex';
import * as actions from './actions';
2020-01-01 13:55:28 +05:30
import * as getters from './getters';
2019-09-04 21:01:54 +05:30
import mutations from './mutations';
import state from './state';
Vue.use(Vuex);
2020-04-22 19:07:51 +05:30
export const monitoringDashboard = {
namespaced: true,
actions,
getters,
mutations,
state,
};
2020-06-23 00:09:42 +05:30
export const createStore = (initState = {}) =>
2019-09-04 21:01:54 +05:30
new Vuex.Store({
modules: {
2020-06-23 00:09:42 +05:30
monitoringDashboard: {
...monitoringDashboard,
state: {
...state(),
...initState,
},
},
2019-09-04 21:01:54 +05:30
},
});