debian-mirror-gitlab/app/assets/javascripts/create_cluster/eks_cluster/index.js

68 lines
1.5 KiB
JavaScript
Raw Normal View History

2019-12-04 20:38:33 +05:30
import Vue from 'vue';
import Vuex from 'vuex';
2019-12-26 22:10:19 +05:30
import { parseBoolean } from '~/lib/utils/common_utils';
2019-12-04 20:38:33 +05:30
import CreateEksCluster from './components/create_eks_cluster.vue';
import createStore from './store';
Vue.use(Vuex);
2019-12-21 20:55:43 +05:30
export default el => {
2019-12-26 22:10:19 +05:30
const {
gitlabManagedClusterHelpPath,
kubernetesIntegrationHelpPath,
accountAndExternalIdsHelpPath,
createRoleArnHelpPath,
getRolesPath,
getRegionsPath,
getKeyPairsPath,
getVpcsPath,
getSubnetsPath,
getSecurityGroupsPath,
getInstanceTypesPath,
externalId,
accountId,
hasCredentials,
createRolePath,
createClusterPath,
signOutPath,
externalLinkIcon,
} = el.dataset;
2019-12-21 20:55:43 +05:30
return new Vue({
el,
2019-12-26 22:10:19 +05:30
store: createStore({
initialState: {
hasCredentials: parseBoolean(hasCredentials),
externalId,
accountId,
createRolePath,
createClusterPath,
signOutPath,
},
apiPaths: {
getRolesPath,
getRegionsPath,
getKeyPairsPath,
getVpcsPath,
getSubnetsPath,
getSecurityGroupsPath,
getInstanceTypesPath,
},
}),
2019-12-04 20:38:33 +05:30
components: {
CreateEksCluster,
},
render(createElement) {
2019-12-21 20:55:43 +05:30
return createElement('create-eks-cluster', {
props: {
gitlabManagedClusterHelpPath,
kubernetesIntegrationHelpPath,
2019-12-26 22:10:19 +05:30
accountAndExternalIdsHelpPath,
createRoleArnHelpPath,
externalLinkIcon,
2019-12-21 20:55:43 +05:30
},
});
2019-12-04 20:38:33 +05:30
},
});
2019-12-21 20:55:43 +05:30
};