diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-05-14 14:38:29 +0200 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-05-14 14:38:29 +0200 |
commit | 3acc649d3066ca4e9bff67751f14b1060a4b3f19 (patch) | |
tree | dc7f193c6eb8bad399a833fc82bed55bfecbfb7a /app/assets/javascripts/projects | |
parent | f15e331dd269b6563420f0de4de16ecb29700b5e (diff) | |
download | gitlab-ce-3acc649d3066ca4e9bff67751f14b1060a4b3f19.tar.gz |
move state into separate file as per vuex docs
Diffstat (limited to 'app/assets/javascripts/projects')
-rw-r--r-- | app/assets/javascripts/projects/gke_cluster_dropdowns/store/index.js | 13 | ||||
-rw-r--r-- | app/assets/javascripts/projects/gke_cluster_dropdowns/store/state.js | 11 |
2 files changed, 13 insertions, 11 deletions
diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/store/index.js b/app/assets/javascripts/projects/gke_cluster_dropdowns/store/index.js index ec71a49c97a..458ca1b3164 100644 --- a/app/assets/javascripts/projects/gke_cluster_dropdowns/store/index.js +++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/store/index.js @@ -3,6 +3,7 @@ import Vuex from 'vuex'; import * as actions from './actions'; import * as getters from './getters'; import mutations from './mutations'; +import state from './state'; Vue.use(Vuex); @@ -10,15 +11,5 @@ export default new Vuex.Store({ actions, getters, mutations, - state: { - selectedProject: { - projectId: '', - name: '', - }, - selectedZone: '', - selectedMachineType: '', - projects: [], - zones: [], - machineTypes: [], - }, + state, }); diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/store/state.js b/app/assets/javascripts/projects/gke_cluster_dropdowns/store/state.js new file mode 100644 index 00000000000..5b1ed85bdb2 --- /dev/null +++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/store/state.js @@ -0,0 +1,11 @@ +export default { + selectedProject: { + projectId: '', + name: '', + }, + selectedZone: '', + selectedMachineType: '', + projects: [], + zones: [], + machineTypes: [], +}; |