diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-28 09:07:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-28 09:07:06 +0000 |
commit | b9e30139939a4fe3f75faf149f641477d38d0cd9 (patch) | |
tree | 79c86b8be4a1d1f000de309ee33a04b06e09167f /app/views/clusters | |
parent | c222aa089016e16374c92fa868c920a239278ef5 (diff) | |
download | gitlab-ce-b9e30139939a4fe3f75faf149f641477d38d0cd9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/clusters')
6 files changed, 44 insertions, 18 deletions
diff --git a/app/views/clusters/clusters/_sidebar.html.haml b/app/views/clusters/clusters/_sidebar.html.haml index bda774ee780..045c03df4fa 100644 --- a/app/views/clusters/clusters/_sidebar.html.haml +++ b/app/views/clusters/clusters/_sidebar.html.haml @@ -1,8 +1,14 @@ +- is_connect_page = local_assigns.fetch(:is_connect_page, false) +- docs_mode = local_assigns.fetch(:docs_mode, false) +- title = is_connect_page ? s_('ClusterIntegration|Connect a Kubernetes cluster') : s_('ClusterIntegration|Create a Kubernetes cluster') + %h3 - = s_('ClusterIntegration|Connect a Kubernetes cluster') + = title %p = clusterable.sidebar_text -%p - = clusterable.learn_more_link -= render 'clusters/clusters/multiple_clusters_message' +- if !docs_mode + %p + = clusterable.learn_more_link + + = render 'clusters/clusters/multiple_clusters_message' 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 826dc749dad..807f98b7b0a 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,12 +1,15 @@ - provider = local_assigns.fetch(:provider) - is_current_provider = provider == params[:provider] - logo_path = local_assigns.fetch(:logo_path) +- help_path = local_assigns.fetch(:help_path) - label = local_assigns.fetch(:label) - last = local_assigns.fetch(:last, false) -- classes = ["btn btn-confirm gl-button btn-confirm-secondary gl-flex-direction-column gl-w-half js-create-#{provider}-cluster-button"] -- conditional_classes = [('gl-mr-5' unless last), ('active' if is_current_provider)] +- docs_mode = local_assigns.fetch(:docs_mode, false) +- classes = ["btn btn-confirm gl-button btn-confirm-secondary gl-flex-direction-column gl-w-half"] +- conditional_classes = [("gl-mr-5" unless last), ("active" if is_current_provider && !docs_mode), ("js-create-#{provider}-cluster-button" if !docs_mode)] +- link = docs_mode ? help_path : clusterable.new_path(provider: provider) -= link_to clusterable.new_path(provider: provider), class: classes + conditional_classes do - .svg-content.gl-p-3= image_tag logo_path, alt: label, class: 'gl-w-64 gl-h-64' += link_to link, class: classes + conditional_classes do + .svg-content.gl-p-3= 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 321fb854e0d..69250141816 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,11 +1,15 @@ - gke_label = s_('ClusterIntegration|Google GKE') - eks_label = s_('ClusterIntegration|Amazon EKS') - create_cluster_label = s_('ClusterIntegration|Where do you want to create a cluster?') +- eks_help_path = help_page_path('user/infrastructure/clusters/connect/new_eks_cluster') +- gke_help_path = help_page_path('user/infrastructure/clusters/connect/new_gke_cluster') +- docs_mode = local_assigns.fetch(:docs_mode, false) + .gl-p-5 %h4.gl-mb-5 = create_cluster_label .gl-display-flex = render partial: 'clusters/clusters/cloud_providers/cloud_provider_button', - locals: { provider: 'aws', label: eks_label, logo_path: 'illustrations/logos/amazon_eks.svg' } + locals: { provider: 'aws', label: eks_label, logo_path: 'illustrations/logos/amazon_eks.svg', help_path: eks_help_path, docs_mode: docs_mode } = render partial: 'clusters/clusters/cloud_providers/cloud_provider_button', - locals: { provider: 'gcp', label: gke_label, logo_path: 'illustrations/logos/google_gke.svg', last: true } + locals: { provider: 'gcp', label: gke_label, logo_path: 'illustrations/logos/google_gke.svg', help_path: gke_help_path, docs_mode: docs_mode, last: true } diff --git a/app/views/clusters/clusters/connect.html.haml b/app/views/clusters/clusters/connect.html.haml index 1043f78bd3c..2976c7e2035 100644 --- a/app/views/clusters/clusters/connect.html.haml +++ b/app/views/clusters/clusters/connect.html.haml @@ -3,9 +3,9 @@ - breadcrumb_title _('Connect a cluster') - page_title _('Connect a Kubernetes Cluster') -.row.gl-mt-3 - .col-md-3 - = render 'sidebar' - .col-md-9 +.gl-md-display-flex.gl-mt-3 + .gl-w-quarter.gl-xs-w-full.gl-flex-shrink-0.gl-md-mr-5 + = render 'sidebar', is_connect_page: true + .gl-w-full #js-cluster-new{ data: js_cluster_new } = render 'clusters/clusters/user/form' diff --git a/app/views/clusters/clusters/new.html.haml b/app/views/clusters/clusters/new.html.haml index a184f412565..095410ae11d 100644 --- a/app/views/clusters/clusters/new.html.haml +++ b/app/views/clusters/clusters/new.html.haml @@ -6,10 +6,10 @@ = render_gcp_signup_offer -.row.gl-mt-3 - .col-md-3 - = render 'sidebar' - .col-md-9 +.gl-md-display-flex.gl-mt-3 + .gl-w-quarter.gl-xs-w-full.gl-flex-shrink-0.gl-md-mr-5 + = render 'sidebar', is_connect_page: false + .gl-w-full = render 'clusters/clusters/cloud_providers/cloud_provider_selector' - if ['aws', 'gcp'].include?(provider) diff --git a/app/views/clusters/clusters/new_cluster_docs.html.haml b/app/views/clusters/clusters/new_cluster_docs.html.haml new file mode 100644 index 00000000000..9b99aef0e72 --- /dev/null +++ b/app/views/clusters/clusters/new_cluster_docs.html.haml @@ -0,0 +1,13 @@ +- @content_class = 'limit-container-width' unless fluid_layout +- add_to_breadcrumbs _('Kubernetes Clusters'), clusterable.index_path +- breadcrumb_title _('Create a cluster') +- page_title _('Create a Kubernetes cluster') +- docs_mode = true + += render_gcp_signup_offer + +.gl-md-display-flex.gl-mt-3 + .gl-w-quarter.gl-xs-w-full.gl-flex-shrink-0.gl-md-mr-5 + = render 'sidebar', docs_mode: docs_mode, is_connect_page: false + .gl-w-full + = render 'clusters/clusters/cloud_providers/cloud_provider_selector', docs_mode: docs_mode |