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