diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /app/assets/javascripts/create_cluster | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'app/assets/javascripts/create_cluster')
4 files changed, 27 insertions, 10 deletions
diff --git a/app/assets/javascripts/create_cluster/components/cluster_form_dropdown.vue b/app/assets/javascripts/create_cluster/components/cluster_form_dropdown.vue index e9d484bdd94..1e3a19b9da1 100644 --- a/app/assets/javascripts/create_cluster/components/cluster_form_dropdown.vue +++ b/app/assets/javascripts/create_cluster/components/cluster_form_dropdown.vue @@ -154,6 +154,7 @@ export default { }); }, beforeDestroy() { + // eslint-disable-next-line @gitlab/no-global-event-off $(this.$refs.dropdown).off(); }, methods: { 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 index 2858561e033..a7425735733 100644 --- 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 @@ -1,10 +1,17 @@ <script> import { createNamespacedHelpers, mapState, mapActions, mapGetters } from 'vuex'; -import { GlFormGroup, GlFormInput, GlFormCheckbox, GlIcon, GlLink, GlSprintf } from '@gitlab/ui'; +import { + GlFormGroup, + GlFormInput, + GlFormCheckbox, + GlIcon, + GlLink, + GlSprintf, + GlButton, +} from '@gitlab/ui'; import { s__ } from '~/locale'; import ClusterFormDropdown from '~/create_cluster/components/cluster_form_dropdown.vue'; import { KUBERNETES_VERSIONS } from '../constants'; -import LoadingButton from '~/vue_shared/components/loading_button.vue'; const { mapState: mapRolesState, mapActions: mapRolesActions } = createNamespacedHelpers('roles'); const { mapState: mapKeyPairsState, mapActions: mapKeyPairsActions } = createNamespacedHelpers( @@ -29,7 +36,7 @@ export default { GlIcon, GlLink, GlSprintf, - LoadingButton, + GlButton, }, props: { gitlabManagedClusterHelpPath: { @@ -508,13 +515,16 @@ export default { </p> </div> <div class="form-group"> - <loading-button - class="js-create-cluster btn-success" + <gl-button + variant="success" + category="primary" + class="js-create-cluster" :disabled="createClusterButtonDisabled" :loading="isCreatingCluster" - :label="createClusterButtonLabel" @click="createCluster()" - /> + > + {{ createClusterButtonLabel }} + </gl-button> </div> </form> </template> diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js b/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js index f3950a3343a..b182d4dff13 100644 --- a/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js +++ b/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js @@ -42,7 +42,13 @@ export const createRole = ({ dispatch, state: { createRolePath } }, payload) => dispatch('createRoleSuccess', awsData); }) - .catch(error => dispatch('createRoleError', { error })); + .catch(error => { + let message = error; + if (error?.response?.data?.message) { + message = error.response.data.message; + } + dispatch('createRoleError', { error: message }); + }); }; export const requestCreateRole = ({ commit }) => { diff --git a/app/assets/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown.vue b/app/assets/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown.vue index 85d9f0d66ab..522fef423af 100644 --- a/app/assets/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown.vue +++ b/app/assets/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown.vue @@ -179,13 +179,13 @@ export default { 'https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral' " target="_blank" - >{{ content }} <gl-icon name="external-link" aria-hidden="true" + >{{ content }} <gl-icon name="external-link" /></gl-link> </template> <template #docsLink="{ content }"> <gl-link :href="docsUrl" target="_blank" - >{{ content }} <gl-icon name="external-link" aria-hidden="true" + >{{ content }} <gl-icon name="external-link" /></gl-link> </template> |