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);
|
|
|
|
|
2021-03-08 18:12:59 +05:30
|
|
|
export default (el) => {
|
2019-12-26 22:10:19 +05:30
|
|
|
const {
|
|
|
|
gitlabManagedClusterHelpPath,
|
2021-01-03 14:25:43 +05:30
|
|
|
namespacePerEnvironmentHelpPath,
|
2019-12-26 22:10:19 +05:30
|
|
|
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,
|
2021-01-03 14:25:43 +05:30
|
|
|
namespacePerEnvironmentHelpPath,
|
2019-12-21 20:55:43 +05:30
|
|
|
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
|
|
|
};
|