summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/components/create_eks_cluster.vue14
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/components/eks_cluster_configuration_form.vue18
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/components/role_name_dropdown.vue0
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/components/security_group_dropdown.vue0
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/components/service_credentials_form.vue3
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/components/subnet_dropdown.vue0
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/components/vpc_dropdown.vue0
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/index.js19
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/services/aws_services_facade.js0
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/store/actions.js3
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/store/getters.js0
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/store/index.js15
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/store/mutation_types.js0
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/store/mutations.js0
-rw-r--r--app/assets/javascripts/create_cluster/eks_cluster/store/state.js23
-rw-r--r--app/assets/javascripts/pages/projects/clusters/new/index.js5
-rw-r--r--app/views/clusters/clusters/new.html.haml3
17 files changed, 103 insertions, 0 deletions
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/components/create_eks_cluster.vue b/app/assets/javascripts/create_cluster/eks_cluster/components/create_eks_cluster.vue
new file mode 100644
index 00000000000..ce2e4b883e4
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/components/create_eks_cluster.vue
@@ -0,0 +1,14 @@
+<script>
+import ServiceCredentialsForm from './service_credentials_form.vue';
+import EksClusterConfigurationForm from './eks_cluster_configuration_form.vue';
+
+export default {
+ components: {
+ ServiceCredentialsForm,
+ EksClusterConfigurationForm,
+ },
+};
+</script>
+<template>
+ <eks-cluster-configuration-form />
+</template>
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/components/eks_cluster_configuration_form.vue b/app/assets/javascripts/create_cluster/eks_cluster/components/eks_cluster_configuration_form.vue
new file mode 100644
index 00000000000..1ec45c8b651
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/components/eks_cluster_configuration_form.vue
@@ -0,0 +1,18 @@
+<script>
+import RoleNameDropdown from './role_name_dropdown.vue';
+import SecurityGroupDropdown from './security_group_dropdown.vue';
+import SubnetDropdown from './subnet_dropdown.vue';
+import VPCDropdown from './vpc_dropdown.vue';
+
+export default {
+ components: {
+ RoleNameDropdown,
+ SecurityGroupDropdown,
+ SubnetDropdown,
+ VPCDropdown,
+ },
+};
+</script>
+<template>
+ <form name="eks-cluster-configuration-form"></form>
+</template>
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/components/role_name_dropdown.vue b/app/assets/javascripts/create_cluster/eks_cluster/components/role_name_dropdown.vue
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/components/role_name_dropdown.vue
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/components/security_group_dropdown.vue b/app/assets/javascripts/create_cluster/eks_cluster/components/security_group_dropdown.vue
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/components/security_group_dropdown.vue
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/components/service_credentials_form.vue b/app/assets/javascripts/create_cluster/eks_cluster/components/service_credentials_form.vue
new file mode 100644
index 00000000000..79029b8cfa8
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/components/service_credentials_form.vue
@@ -0,0 +1,3 @@
+<template>
+ <form name="service-credentials-form"></form>
+</template>
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/components/subnet_dropdown.vue b/app/assets/javascripts/create_cluster/eks_cluster/components/subnet_dropdown.vue
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/components/subnet_dropdown.vue
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/components/vpc_dropdown.vue b/app/assets/javascripts/create_cluster/eks_cluster/components/vpc_dropdown.vue
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/components/vpc_dropdown.vue
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/index.js b/app/assets/javascripts/create_cluster/eks_cluster/index.js
new file mode 100644
index 00000000000..c62e5ec101d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/index.js
@@ -0,0 +1,19 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import CreateEksCluster from './components/create_eks_cluster.vue';
+import createStore from './store';
+
+Vue.use(Vuex);
+
+export default () =>
+ new Vue({
+ el: '.js-create-eks-cluster-form-container',
+ store: createStore(),
+ components: {
+ CreateEksCluster,
+ },
+ data() {},
+ render(createElement) {
+ return createElement('create-eks-cluster');
+ },
+ });
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/services/aws_services_facade.js b/app/assets/javascripts/create_cluster/eks_cluster/services/aws_services_facade.js
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/services/aws_services_facade.js
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js b/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js
new file mode 100644
index 00000000000..861bcddfcc7
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js
@@ -0,0 +1,3 @@
+// import awsServices from '../services/aws_services_facade';
+
+export default () => {};
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/getters.js b/app/assets/javascripts/create_cluster/eks_cluster/store/getters.js
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/store/getters.js
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/index.js b/app/assets/javascripts/create_cluster/eks_cluster/store/index.js
new file mode 100644
index 00000000000..99e9e35fd1a
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/store/index.js
@@ -0,0 +1,15 @@
+import Vuex from 'vuex';
+import * as actions from './actions';
+import * as getters from './getters';
+import mutations from './mutations';
+import state from './state';
+
+const createStore = () =>
+ new Vuex.Store({
+ actions,
+ getters,
+ mutations,
+ state,
+ });
+
+export default createStore;
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/mutation_types.js b/app/assets/javascripts/create_cluster/eks_cluster/store/mutation_types.js
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/store/mutation_types.js
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/mutations.js b/app/assets/javascripts/create_cluster/eks_cluster/store/mutations.js
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/store/mutations.js
diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/state.js b/app/assets/javascripts/create_cluster/eks_cluster/store/state.js
new file mode 100644
index 00000000000..5007df8ad95
--- /dev/null
+++ b/app/assets/javascripts/create_cluster/eks_cluster/store/state.js
@@ -0,0 +1,23 @@
+export default () => ({
+ serviceCredentials: {
+ accessKeyId: '',
+ secretAccessKey: '',
+ },
+ isValidatingCredentials: false,
+ validCredentials: false,
+
+ isLoadingRoles: false,
+ isLoadingVPCs: false,
+ isLoadingSubnets: false,
+ isLoadingSecurityGroups: false,
+
+ roles: [],
+ vpcs: [],
+ subnets: [],
+ securityGroups: [],
+
+ selectedRole: '',
+ selectedVPC: '',
+ selectedSubnet: '',
+ selectedSecurityGroup: '',
+});
diff --git a/app/assets/javascripts/pages/projects/clusters/new/index.js b/app/assets/javascripts/pages/projects/clusters/new/index.js
new file mode 100644
index 00000000000..518253b14c7
--- /dev/null
+++ b/app/assets/javascripts/pages/projects/clusters/new/index.js
@@ -0,0 +1,5 @@
+import initCreateEKSCluster from '~/create_cluster/eks_cluster';
+
+document.addEventListener('DOMContentLoaded', () => {
+ initCreateEKSCluster();
+});
diff --git a/app/views/clusters/clusters/new.html.haml b/app/views/clusters/clusters/new.html.haml
index fb182d99ff0..c9e4dcec36d 100644
--- a/app/views/clusters/clusters/new.html.haml
+++ b/app/views/clusters/clusters/new.html.haml
@@ -5,6 +5,9 @@
- link_end = '<a/>'.html_safe
= javascript_include_tag 'https://apis.google.com/js/api.js'
+- if create_eks_enabled
+ = javascript_include_tag 'https://sdk.amazonaws.com/js/aws-sdk-2.523.0.min.js'
+
= render_gcp_signup_offer
.row.prepend-top-default