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

54 lines
1.2 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,
externalId,
accountId,
2020-01-01 13:55:28 +05:30
instanceTypes,
2019-12-26 22:10:19 +05:30
hasCredentials,
createRolePath,
createClusterPath,
externalLinkIcon,
2020-01-01 13:55:28 +05:30
roleArn,
2019-12-26 22:10:19 +05:30
} = 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,
2020-01-01 13:55:28 +05:30
instanceTypes: JSON.parse(instanceTypes),
2019-12-26 22:10:19 +05:30
createRolePath,
createClusterPath,
2020-01-01 13:55:28 +05:30
roleArn,
2019-12-26 22:10:19 +05:30
},
}),
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
};