summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/projects
diff options
context:
space:
mode:
authorDennis Tang <dtang@gitlab.com>2018-05-14 14:38:29 +0200
committerDennis Tang <dtang@gitlab.com>2018-05-14 14:38:29 +0200
commit3acc649d3066ca4e9bff67751f14b1060a4b3f19 (patch)
treedc7f193c6eb8bad399a833fc82bed55bfecbfb7a /app/assets/javascripts/projects
parentf15e331dd269b6563420f0de4de16ecb29700b5e (diff)
downloadgitlab-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.js13
-rw-r--r--app/assets/javascripts/projects/gke_cluster_dropdowns/store/state.js11
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: [],
+};