diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 12:09:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 12:09:00 +0000 |
commit | 88a0824944720b6edaaef56376713541b9a02118 (patch) | |
tree | f5fcc4f9755f249779cda9a8f02902d734af6e7e /app/views/clusters/clusters | |
parent | 7d19df2d34a9803d9f077c16315ba919b7ae2aa2 (diff) | |
download | gitlab-ce-88a0824944720b6edaaef56376713541b9a02118.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/clusters/clusters')
3 files changed, 13 insertions, 6 deletions
diff --git a/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml b/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml index 56d46580b9e..c10983a5405 100644 --- a/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml +++ b/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml @@ -1,10 +1,12 @@ - provider = local_assigns.fetch(:provider) +- is_current_provider = provider == params[:provider] - logo_path = local_assigns.fetch(:logo_path) - label = local_assigns.fetch(:label) - last = local_assigns.fetch(:last, false) -- classes = ['btn btn-light btn-outline flex-fill d-inline-flex flex-column justify-content-center align-items-center', ('mr-3' unless last)] +- classes = ["btn btn-light btn-outline flex-fill d-inline-flex flex-column justify-content-center align-items-center w-50 js-create-#{provider}-cluster-button"] +- conditional_classes = [('mr-3' unless last), ('active' if is_current_provider)] -= link_to clusterable.new_path(provider: provider), class: classes do += link_to clusterable.new_path(provider: provider), class: classes + conditional_classes do .svg-content.p-2= image_tag logo_path, alt: label, class: 'gl-w-64 gl-h-64' %span = label diff --git a/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml b/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml index 91925f5f96f..aee355bbf71 100644 --- a/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml +++ b/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml @@ -1,8 +1,8 @@ - gke_label = s_('ClusterIntegration|Google GKE') - eks_label = s_('ClusterIntegration|Amazon EKS') - create_cluster_label = s_('ClusterIntegration|Create cluster on') -.d-flex.flex-column - %h5.mb-3 +.d-flex.flex-column.p-3 + %h4.mb-3 = create_cluster_label .d-flex = render partial: 'clusters/clusters/cloud_providers/cloud_provider_button', diff --git a/app/views/clusters/clusters/new.html.haml b/app/views/clusters/clusters/new.html.haml index 629585d82cd..fae78fbb7f4 100644 --- a/app/views/clusters/clusters/new.html.haml +++ b/app/views/clusters/clusters/new.html.haml @@ -1,6 +1,7 @@ - breadcrumb_title _('Kubernetes') - page_title _('Kubernetes Cluster') - active_tab = local_assigns.fetch(:active_tab, 'create') +- provider = params[:provider] = javascript_include_tag 'https://apis.google.com/js/api.js' = render_gcp_signup_offer @@ -19,8 +20,12 @@ %span Add existing cluster .tab-content.gitlab-tab-content - .tab-pane{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' } - = render new_cluster_partial(provider: params[:provider]) + .tab-pane.p-0{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' } + = render 'clusters/clusters/cloud_providers/cloud_provider_selector' + + - if ['aws', 'gcp'].include?(provider) + .p-3.border-top + = render "clusters/clusters/#{provider}/new" .tab-pane{ id: 'add-cluster-pane', class: active_when(active_tab == 'add'), role: 'tabpanel' } = render 'clusters/clusters/user/header' |