diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/views/clusters | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/views/clusters')
9 files changed, 62 insertions, 29 deletions
diff --git a/app/views/clusters/clusters/_banner.html.haml b/app/views/clusters/clusters/_banner.html.haml index 6fb3f26ff4f..b7d1aa6f944 100644 --- a/app/views/clusters/clusters/_banner.html.haml +++ b/app/views/clusters/clusters/_banner.html.haml @@ -6,17 +6,13 @@ %span.gl-spinner.gl-spinner-dark{ 'aria-label': 'Loading' } %span.gl-ml-2= s_('ClusterIntegration|Kubernetes cluster is being created...') -= render 'shared/global_alert', - variant: :warning, - alert_class: 'hidden js-cluster-api-unreachable', - close_button_class: 'js-close' do += render Pajamas::AlertComponent.new(variant: :warning, + alert_class: 'hidden js-cluster-api-unreachable') do .gl-alert-body = s_('ClusterIntegration|Your cluster API is unreachable. Please ensure your API URL is correct.') -= render 'shared/global_alert', - variant: :warning, - alert_class: 'hidden js-cluster-authentication-failure js-cluster-api-unreachable', - close_button_class: 'js-close' do += render Pajamas::AlertComponent.new(variant: :warning, + alert_class: 'hidden js-cluster-authentication-failure js-cluster-api-unreachable') do .gl-alert-body = s_('ClusterIntegration|There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid.') diff --git a/app/views/clusters/clusters/_deprecation_alert.html.haml b/app/views/clusters/clusters/_deprecation_alert.html.haml new file mode 100644 index 00000000000..202e2c14d3f --- /dev/null +++ b/app/views/clusters/clusters/_deprecation_alert.html.haml @@ -0,0 +1,7 @@ += render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_class: 'gl-mt-6 gl-mb-3') do + .gl-alert-body + - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe + - issue_link_start = link_start % { url: 'https://gitlab.com/gitlab-org/configure/general/-/issues/199' } + - docs_link_start = link_start % { url: help_page_path('user/clusters/agent/index.md') } + - link_end = '</a>'.html_safe + = s_('ClusterIntegration|This process is %{issue_link_start}deprecated%{issue_link_end}. Use the %{docs_link_start}the GitLab agent for Kubernetes%{docs_link_end} instead.').html_safe % { docs_link_start: docs_link_start, docs_link_end: link_end, issue_link_start: issue_link_start, issue_link_end: link_end } diff --git a/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml b/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml index 3a4632affdc..ffd910b1b9d 100644 --- a/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml +++ b/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml @@ -1,8 +1,8 @@ - link = link_to(s_('ClusterIntegration|sign up'), 'https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral', target: '_blank', rel: 'noopener noreferrer') -= render 'shared/global_alert', - title: s_('ClusterIntegration|Did you know?'), + += render Pajamas::AlertComponent.new(title: s_('ClusterIntegration|Did you know?'), alert_class: 'gcp-signup-offer', - alert_data: { feature_id: Users::CalloutsHelper::GCP_SIGNUP_OFFER, dismiss_endpoint: callouts_path } do + alert_data: { feature_id: Users::CalloutsHelper::GCP_SIGNUP_OFFER, dismiss_endpoint: callouts_path }) do .gl-alert-body = s_('ClusterIntegration|Every new Google Cloud Platform (GCP) account receives $300 in credit upon %{sign_up_link}. In partnership with Google, GitLab is able to offer an additional $200 for both new and existing GCP accounts to get started with GitLab\'s Google Kubernetes Engine Integration.').html_safe % { sign_up_link: link } .gl-alert-actions 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..ec00a9c345a 100644 --- a/app/views/clusters/clusters/connect.html.haml +++ b/app/views/clusters/clusters/connect.html.haml @@ -3,9 +3,11 @@ - breadcrumb_title _('Connect a cluster') - page_title _('Connect a Kubernetes Cluster') -.row.gl-mt-3 - .col-md-3 - = render 'sidebar' - .col-md-9 += render 'deprecation_alert' + +.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..53d521fface 100644 --- a/app/views/clusters/clusters/new.html.haml +++ b/app/views/clusters/clusters/new.html.haml @@ -4,12 +4,14 @@ - page_title _('Create a Kubernetes cluster') - provider = params[:provider] += render 'deprecation_alert' + = 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 |