diff options
Diffstat (limited to 'app/assets/javascripts/create_cluster')
13 files changed, 35 insertions, 32 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 7f4c3635119..fa0a17f3643 100644 --- a/app/assets/javascripts/create_cluster/components/cluster_form_dropdown.vue +++ b/app/assets/javascripts/create_cluster/components/cluster_form_dropdown.vue @@ -1,10 +1,10 @@ <script> -import { isNil } from 'lodash'; -import $ from 'jquery'; import { GlIcon } from '@gitlab/ui'; -import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_search_input.vue'; -import DropdownHiddenInput from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue'; +import $ from 'jquery'; +import { isNil } from 'lodash'; import DropdownButton from '~/vue_shared/components/dropdown/dropdown_button.vue'; +import DropdownHiddenInput from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue'; +import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_search_input.vue'; const toArray = (value) => (isNil(value) ? [] : [].concat(value)); const itemsProp = (items, prop) => items.map((item) => item[prop]); 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 index eb195ad2b30..ba170dc0e19 100644 --- 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 @@ -1,7 +1,7 @@ <script> import { mapState } from 'vuex'; -import ServiceCredentialsForm from './service_credentials_form.vue'; import EksClusterConfigurationForm from './eks_cluster_configuration_form.vue'; +import ServiceCredentialsForm from './service_credentials_form.vue'; export default { components: { 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 a7425735733..4aee02e45c8 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,5 +1,4 @@ <script> -import { createNamespacedHelpers, mapState, mapActions, mapGetters } from 'vuex'; import { GlFormGroup, GlFormInput, @@ -9,8 +8,9 @@ import { GlSprintf, GlButton, } from '@gitlab/ui'; -import { s__ } from '~/locale'; +import { createNamespacedHelpers, mapState, mapActions, mapGetters } from 'vuex'; import ClusterFormDropdown from '~/create_cluster/components/cluster_form_dropdown.vue'; +import { s__ } from '~/locale'; import { KUBERNETES_VERSIONS } from '../constants'; const { mapState: mapRolesState, mapActions: mapRolesActions } = createNamespacedHelpers('roles'); 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 index a3f76241bf2..f104eb61e41 100644 --- 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 @@ -1,11 +1,11 @@ <script> /* eslint-disable vue/no-v-html */ -import { GlButton, GlFormGroup, GlFormInput, GlIcon, GlLink, GlSprintf } from '@gitlab/ui'; +import { GlButton, GlFormGroup, GlFormInput, GlIcon, GlLink, GlSprintf, GlAlert } from '@gitlab/ui'; import { escape } from 'lodash'; import { mapState, mapActions } from 'vuex'; -import { DEFAULT_REGION } from '../constants'; import { sprintf, s__, __ } from '~/locale'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; +import { DEFAULT_REGION } from '../constants'; export default { components: { @@ -16,6 +16,7 @@ export default { GlLink, GlSprintf, ClipboardButton, + GlAlert, }, props: { accountAndExternalIdsHelpPath: { @@ -105,9 +106,14 @@ export default { ) }} </p> - <div v-if="createRoleError" class="js-invalid-credentials bs-callout bs-callout-danger"> + <gl-alert + v-if="createRoleError" + class="js-invalid-credentials gl-mb-5" + variant="danger" + :dismissible="false" + > {{ createRoleError }} - </div> + </gl-alert> <div class="form-row"> <div class="form-group col-md-6"> <label for="gitlab-account-id">{{ __('Account ID') }}</label> 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 index c2b59191997..bd9554521b8 100644 --- 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 @@ -1,6 +1,6 @@ -import AWS from 'aws-sdk/global'; import EC2 from 'aws-sdk/clients/ec2'; import IAM from 'aws-sdk/clients/iam'; +import AWS from 'aws-sdk/global'; const lookupVpcName = ({ Tags: tags, VpcId: id }) => { const nameTag = tags.find(({ Key: key }) => key === 'Name'); 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 55576efd3b8..8b7c93ad880 100644 --- a/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js +++ b/app/assets/javascripts/create_cluster/eks_cluster/store/actions.js @@ -1,9 +1,9 @@ -import * as types from './mutation_types'; -import { DEFAULT_REGION } from '../constants'; -import { setAWSConfig } from '../services/aws_services_facade'; -import axios from '~/lib/utils/axios_utils'; import { deprecatedCreateFlash as createFlash } from '~/flash'; +import axios from '~/lib/utils/axios_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; +import { DEFAULT_REGION } from '../constants'; +import { setAWSConfig } from '../services/aws_services_facade'; +import * as types from './mutation_types'; const getErrorMessage = (data) => { const errorKey = Object.keys(data)[0]; diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/index.js b/app/assets/javascripts/create_cluster/eks_cluster/store/index.js index 262bbb3167a..ed054989771 100644 --- a/app/assets/javascripts/create_cluster/eks_cluster/store/index.js +++ b/app/assets/javascripts/create_cluster/eks_cluster/store/index.js @@ -1,11 +1,5 @@ import Vuex from 'vuex'; -import * as actions from './actions'; -import * as getters from './getters'; -import mutations from './mutations'; -import state from './state'; - import clusterDropdownStore from '~/create_cluster/store/cluster_dropdown'; - import { fetchRoles, fetchKeyPairs, @@ -13,6 +7,10 @@ import { fetchSubnets, fetchSecurityGroups, } from '../services/aws_services_facade'; +import * as actions from './actions'; +import * as getters from './getters'; +import mutations from './mutations'; +import state from './state'; const createStore = ({ initialState }) => new Vuex.Store({ diff --git a/app/assets/javascripts/create_cluster/gke_cluster/components/gke_dropdown_mixin.js b/app/assets/javascripts/create_cluster/gke_cluster/components/gke_dropdown_mixin.js index f9d0d86e381..1246fdb19d7 100644 --- a/app/assets/javascripts/create_cluster/gke_cluster/components/gke_dropdown_mixin.js +++ b/app/assets/javascripts/create_cluster/gke_cluster/components/gke_dropdown_mixin.js @@ -1,7 +1,7 @@ import { GlLoadingIcon } from '@gitlab/ui'; -import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_search_input.vue'; -import DropdownHiddenInput from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue'; import DropdownButton from '~/vue_shared/components/dropdown/dropdown_button.vue'; +import DropdownHiddenInput from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue'; +import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_search_input.vue'; import store from '../store'; 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 acbc4d1b3bc..b6f0bdbf01d 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 @@ -1,6 +1,6 @@ <script> -import { mapState, mapGetters, mapActions } from 'vuex'; import { GlSprintf, GlLink, GlIcon } from '@gitlab/ui'; +import { mapState, mapGetters, mapActions } from 'vuex'; import { s__ } from '~/locale'; import gkeDropdownMixin from './gke_dropdown_mixin'; diff --git a/app/assets/javascripts/create_cluster/gke_cluster/index.js b/app/assets/javascripts/create_cluster/gke_cluster/index.js index c02173fc510..4eafbdb7265 100644 --- a/app/assets/javascripts/create_cluster/gke_cluster/index.js +++ b/app/assets/javascripts/create_cluster/gke_cluster/index.js @@ -1,15 +1,14 @@ import Vue from 'vue'; import { deprecatedCreateFlash as Flash } from '~/flash'; -import GkeProjectIdDropdown from './components/gke_project_id_dropdown.vue'; -import GkeZoneDropdown from './components/gke_zone_dropdown.vue'; import GkeMachineTypeDropdown from './components/gke_machine_type_dropdown.vue'; +import GkeProjectIdDropdown from './components/gke_project_id_dropdown.vue'; import GkeSubmitButton from './components/gke_submit_button.vue'; +import GkeZoneDropdown from './components/gke_zone_dropdown.vue'; +import * as CONSTANTS from './constants'; import gapiLoader from './gapi_loader'; import store from './store'; -import * as CONSTANTS from './constants'; - const mountComponent = (entryPoint, component, componentName, extraProps = {}) => { const el = document.querySelector(entryPoint); if (!el) return false; diff --git a/app/assets/javascripts/create_cluster/gke_cluster/store/actions.js b/app/assets/javascripts/create_cluster/gke_cluster/store/actions.js index 8977053297a..f4c35dafc22 100644 --- a/app/assets/javascripts/create_cluster/gke_cluster/store/actions.js +++ b/app/assets/javascripts/create_cluster/gke_cluster/store/actions.js @@ -1,5 +1,5 @@ -import * as types from './mutation_types'; import gapiLoader from '../gapi_loader'; +import * as types from './mutation_types'; const gapiResourceListRequest = ({ resource, params, commit, mutation, payloadKey }) => new Promise((resolve, reject) => { diff --git a/app/assets/javascripts/create_cluster/init_create_cluster.js b/app/assets/javascripts/create_cluster/init_create_cluster.js index f97da3d55db..d367d7ec333 100644 --- a/app/assets/javascripts/create_cluster/init_create_cluster.js +++ b/app/assets/javascripts/create_cluster/init_create_cluster.js @@ -1,6 +1,6 @@ +import PersistentUserCallout from '~/persistent_user_callout'; import initGkeDropdowns from './gke_cluster'; import initGkeNamespace from './gke_cluster_namespace'; -import PersistentUserCallout from '~/persistent_user_callout'; const newClusterViews = [':clusters:new', ':clusters:create_gcp', ':clusters:create_user']; diff --git a/app/assets/javascripts/create_cluster/store/cluster_dropdown/index.js b/app/assets/javascripts/create_cluster/store/cluster_dropdown/index.js index 0b19589215c..de8cc44fa7c 100644 --- a/app/assets/javascripts/create_cluster/store/cluster_dropdown/index.js +++ b/app/assets/javascripts/create_cluster/store/cluster_dropdown/index.js @@ -1,5 +1,5 @@ -import * as getters from './getters'; import actions from './actions'; +import * as getters from './getters'; import mutations from './mutations'; import state from './state'; |