2019-08-30 20:36:59 +00:00
|
|
|
import Vue from 'vue';
|
|
|
|
import Vuex from 'vuex';
|
2019-11-08 06:06:24 +00:00
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
2019-08-30 20:36:59 +00:00
|
|
|
import CreateEksCluster from './components/create_eks_cluster.vue';
|
|
|
|
import createStore from './store';
|
|
|
|
|
|
|
|
Vue.use(Vuex);
|
|
|
|
|
2020-12-23 21:10:24 +00:00
|
|
|
export default (el) => {
|
2019-11-08 06:06:24 +00:00
|
|
|
const {
|
|
|
|
gitlabManagedClusterHelpPath,
|
2020-09-29 18:09:52 +00:00
|
|
|
namespacePerEnvironmentHelpPath,
|
2019-11-08 06:06:24 +00:00
|
|
|
kubernetesIntegrationHelpPath,
|
|
|
|
accountAndExternalIdsHelpPath,
|
|
|
|
createRoleArnHelpPath,
|
|
|
|
externalId,
|
|
|
|
accountId,
|
2019-12-12 00:07:43 +00:00
|
|
|
instanceTypes,
|
2019-11-08 06:06:24 +00:00
|
|
|
hasCredentials,
|
|
|
|
createRolePath,
|
2019-11-14 00:06:24 +00:00
|
|
|
createClusterPath,
|
2019-11-08 06:06:24 +00:00
|
|
|
externalLinkIcon,
|
2019-12-12 00:07:43 +00:00
|
|
|
roleArn,
|
2019-11-08 06:06:24 +00:00
|
|
|
} = el.dataset;
|
2019-10-18 00:07:45 +00:00
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
2019-11-08 06:06:24 +00:00
|
|
|
store: createStore({
|
|
|
|
initialState: {
|
|
|
|
hasCredentials: parseBoolean(hasCredentials),
|
|
|
|
externalId,
|
|
|
|
accountId,
|
2019-12-12 00:07:43 +00:00
|
|
|
instanceTypes: JSON.parse(instanceTypes),
|
2019-11-08 06:06:24 +00:00
|
|
|
createRolePath,
|
2019-11-14 00:06:24 +00:00
|
|
|
createClusterPath,
|
2019-12-12 00:07:43 +00:00
|
|
|
roleArn,
|
2019-11-08 06:06:24 +00:00
|
|
|
},
|
|
|
|
}),
|
2019-08-30 20:36:59 +00:00
|
|
|
components: {
|
|
|
|
CreateEksCluster,
|
|
|
|
},
|
|
|
|
render(createElement) {
|
2019-10-14 21:06:30 +00:00
|
|
|
return createElement('create-eks-cluster', {
|
|
|
|
props: {
|
2019-10-18 00:07:45 +00:00
|
|
|
gitlabManagedClusterHelpPath,
|
2020-09-29 18:09:52 +00:00
|
|
|
namespacePerEnvironmentHelpPath,
|
2019-10-18 00:07:45 +00:00
|
|
|
kubernetesIntegrationHelpPath,
|
2019-11-08 06:06:24 +00:00
|
|
|
accountAndExternalIdsHelpPath,
|
|
|
|
createRoleArnHelpPath,
|
|
|
|
externalLinkIcon,
|
2019-10-14 21:06:30 +00:00
|
|
|
},
|
|
|
|
});
|
2019-08-30 20:36:59 +00:00
|
|
|
},
|
|
|
|
});
|
2019-10-18 00:07:45 +00:00
|
|
|
};
|