diff options
Diffstat (limited to 'app/views/clusters/clusters')
12 files changed, 48 insertions, 68 deletions
diff --git a/app/views/clusters/clusters/_banner.html.haml b/app/views/clusters/clusters/_banner.html.haml index 1ca4f9c670e..6fb3f26ff4f 100644 --- a/app/views/clusters/clusters/_banner.html.haml +++ b/app/views/clusters/clusters/_banner.html.haml @@ -9,7 +9,6 @@ = render 'shared/global_alert', variant: :warning, alert_class: 'hidden js-cluster-api-unreachable', - is_contained: true, close_button_class: 'js-close' do .gl-alert-body = s_('ClusterIntegration|Your cluster API is unreachable. Please ensure your API URL is correct.') @@ -17,7 +16,6 @@ = render 'shared/global_alert', variant: :warning, alert_class: 'hidden js-cluster-authentication-failure js-cluster-api-unreachable', - is_contained: true, close_button_class: 'js-close' 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/_cluster_list.html.haml b/app/views/clusters/clusters/_cluster_list.html.haml deleted file mode 100644 index e5e1b68225e..00000000000 --- a/app/views/clusters/clusters/_cluster_list.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -- if !clusters.empty? - .top-area.adjust - .gl-display-block.gl-text-right.gl-my-4.gl-w-full - - if clusterable.can_add_cluster? - = link_to s_('ClusterIntegration|Connect cluster with certificate'), clusterable.new_path, class: 'btn gl-button btn-confirm js-add-cluster gl-py-2', data: { qa_selector: 'integrate_kubernetes_cluster_button' } - - else - %span.btn.gl-button.btn-confirm.js-add-cluster.disabled.gl-py-2 - = s_("ClusterIntegration|Connect cluster with certificate") - -#js-clusters-list-app{ data: js_clusters_list_data(clusterable) } 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 9d249931a34..3a4632affdc 100644 --- a/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml +++ b/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml @@ -1,11 +1,10 @@ - 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') -.gcp-signup-offer.gl-alert.gl-alert-info.gl-my-3{ role: 'alert', data: { feature_id: Users::CalloutsHelper::GCP_SIGNUP_OFFER, dismiss_endpoint: callouts_path } } - .gl-alert-container - %button.js-close.btn.gl-dismiss-btn.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', size: 16, css_class: 'gl-icon') - = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content - %h4.gl-alert-title= s_('ClusterIntegration|Did you know?') - %p.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 } - %a.gl-button.btn-confirm.text-decoration-none{ href: 'https://cloud.google.com/partners/partnercredit/?pcn_code=0014M00001h35gDQAQ#contact-form', target: '_blank', rel: 'noopener noreferrer' } - = s_("ClusterIntegration|Apply for credit") += render 'shared/global_alert', + 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 + .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 + %a.gl-button.btn-confirm.text-decoration-none{ href: 'https://cloud.google.com/partners/partnercredit/?pcn_code=0014M00001h35gDQAQ#contact-form', target: '_blank', rel: 'noopener noreferrer' } + = s_("ClusterIntegration|Apply for credit") diff --git a/app/views/clusters/clusters/_multiple_clusters_message.html.haml b/app/views/clusters/clusters/_multiple_clusters_message.html.haml index ed95744c11d..04c1f9b6e7a 100644 --- a/app/views/clusters/clusters/_multiple_clusters_message.html.haml +++ b/app/views/clusters/clusters/_multiple_clusters_message.html.haml @@ -2,5 +2,5 @@ - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe - help_link_end = '</a>'.html_safe -%p - = s_('ClusterIntegration|If you are setting up multiple clusters and are using Auto DevOps, %{help_link_start}read this first%{help_link_end}.').html_safe % { help_link_start: help_link_start % { url: autodevops_help_url }, help_link_end: help_link_end } +%p.gl-font-weight-bold + = s_('ClusterIntegration|Using AutoDevOps with multiple clusters? %{help_link_start}Read this first.%{help_link_end}').html_safe % { help_link_start: help_link_start % { url: autodevops_help_url }, help_link_end: help_link_end } diff --git a/app/views/clusters/clusters/_sidebar.html.haml b/app/views/clusters/clusters/_sidebar.html.haml index 31add011bfa..bda774ee780 100644 --- a/app/views/clusters/clusters/_sidebar.html.haml +++ b/app/views/clusters/clusters/_sidebar.html.haml @@ -1,5 +1,5 @@ -%h4.gl-mt-0 - = s_('ClusterIntegration|Add a Kubernetes cluster integration') +%h3 + = s_('ClusterIntegration|Connect a Kubernetes cluster') %p = clusterable.sidebar_text %p 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 c10983a5405..826dc749dad 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 @@ -3,10 +3,10 @@ - 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 w-50 js-create-#{provider}-cluster-button"] -- conditional_classes = [('mr-3' unless last), ('active' if is_current_provider)] +- 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)] = 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' + .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 aee355bbf71..321fb854e0d 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,10 +1,10 @@ - gke_label = s_('ClusterIntegration|Google GKE') - eks_label = s_('ClusterIntegration|Amazon EKS') -- create_cluster_label = s_('ClusterIntegration|Create cluster on') -.d-flex.flex-column.p-3 - %h4.mb-3 +- create_cluster_label = s_('ClusterIntegration|Where do you want to create a cluster?') +.gl-p-5 + %h4.gl-mb-5 = create_cluster_label - .d-flex + .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' } = render partial: 'clusters/clusters/cloud_providers/cloud_provider_button', diff --git a/app/views/clusters/clusters/connect.html.haml b/app/views/clusters/clusters/connect.html.haml new file mode 100644 index 00000000000..1043f78bd3c --- /dev/null +++ b/app/views/clusters/clusters/connect.html.haml @@ -0,0 +1,11 @@ +- @content_class = 'limit-container-width' unless fluid_layout +- add_to_breadcrumbs _('Kubernetes Clusters'), clusterable.index_path +- breadcrumb_title _('Connect a cluster') +- page_title _('Connect a Kubernetes Cluster') + +.row.gl-mt-3 + .col-md-3 + = render 'sidebar' + .col-md-9 + #js-cluster-new{ data: js_cluster_new } + = render 'clusters/clusters/user/form' diff --git a/app/views/clusters/clusters/gcp/_form.html.haml b/app/views/clusters/clusters/gcp/_form.html.haml index c8105fd1152..58b8e8b1003 100644 --- a/app/views/clusters/clusters/gcp/_form.html.haml +++ b/app/views/clusters/clusters/gcp/_form.html.haml @@ -67,20 +67,20 @@ label_class: 'label-bold' } .form-text.text-muted = s_('ClusterIntegration|Uses the Cloud Run, Istio, and HTTP Load Balancing addons for this cluster.') - = link_to _('More information'), help_page_path('user/project/clusters/add_gke_clusters.md', anchor: 'cloud-run-for-anthos'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('user/project/clusters/add_gke_clusters.md', anchor: 'cloud-run-for-anthos'), target: '_blank', rel: 'noopener noreferrer' .form-group = field.check_box :managed, { label: s_('ClusterIntegration|GitLab-managed cluster'), label_class: 'label-bold' } .form-text.text-muted = s_('ClusterIntegration|Allow GitLab to manage namespaces and service accounts for this cluster.') - = link_to _('More information'), help_page_path('user/project/clusters/gitlab_managed_clusters.md'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('user/project/clusters/gitlab_managed_clusters.md'), target: '_blank', rel: 'noopener noreferrer' .form-group = field.check_box :namespace_per_environment, { label: s_('ClusterIntegration|Namespace per environment'), label_class: 'label-bold' } .form-text.text-muted = s_('ClusterIntegration|Deploy each environment to its own namespace. Otherwise, environments within a project share a project-wide namespace. Note that anyone who can trigger a deployment of a namespace can read its secrets. If modified, existing environments will use their current namespaces until the cluster cache is cleared.') - = link_to _('More information'), help_page_path('user/project/clusters/deploy_to_cluster.md', anchor: 'custom-namespace'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('user/project/clusters/deploy_to_cluster.md', anchor: 'custom-namespace'), target: '_blank', rel: 'noopener noreferrer' .form-group.js-gke-cluster-creation-submit-container = field.submit s_('ClusterIntegration|Create Kubernetes cluster'), diff --git a/app/views/clusters/clusters/index.html.haml b/app/views/clusters/clusters/index.html.haml index 457e34b306a..abe9cc9f27d 100644 --- a/app/views/clusters/clusters/index.html.haml +++ b/app/views/clusters/clusters/index.html.haml @@ -4,9 +4,5 @@ = render_gcp_signup_offer .clusters-container - - if display_cluster_agents?(clusterable) - .gl-my-6 - .js-clusters-main-view{ data: js_clusters_data(clusterable) } - - - else - = render 'cluster_list', clusters: @clusters + .gl-my-6 + .js-clusters-main-view{ data: js_clusters_list_data(clusterable) } diff --git a/app/views/clusters/clusters/new.html.haml b/app/views/clusters/clusters/new.html.haml index 7af7a812338..a184f412565 100644 --- a/app/views/clusters/clusters/new.html.haml +++ b/app/views/clusters/clusters/new.html.haml @@ -1,9 +1,8 @@ -- breadcrumb_title _('Kubernetes') -- page_title _('Kubernetes Cluster') +- @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') - provider = params[:provider] -- active_tab = params[:tab] || local_assigns.fetch(:active_tab, 'create') -- is_active_tab_create = active_tab === 'create' -- is_active_tab_add = active_tab === 'add' = render_gcp_signup_offer @@ -11,21 +10,8 @@ .col-md-3 = render 'sidebar' .col-md-9 - = gl_tabs_nav({ class: 'nav-justified' }) do - = gl_tab_link_to clusterable.new_path(tab: 'create'), { item_active: is_active_tab_create } do - %span= create_new_cluster_label(provider: params[:provider]) - = gl_tab_link_to s_('ClusterIntegration|Connect existing cluster'), clusterable.new_path(tab: 'add'), { item_active: is_active_tab_add, qa_selector: 'add_existing_cluster_tab' } + = render 'clusters/clusters/cloud_providers/cloud_provider_selector' - .tab-content - - if is_active_tab_create - .tab-pane.active{ role: 'tabpanel' } - = render 'clusters/clusters/cloud_providers/cloud_provider_selector' - - - if ['aws', 'gcp'].include?(provider) - .p-3.border-top - = render "clusters/clusters/#{provider}/new" - - - if is_active_tab_add - .tab-pane.active.gl-p-5{ role: 'tabpanel' } - #js-cluster-new{ data: js_cluster_new } - = render 'clusters/clusters/user/form' + - if ['aws', 'gcp'].include?(provider) + .gl-p-5.gl-border-1.gl-border-t-solid.gl-border-gray-100 + = render "clusters/clusters/#{provider}/new" diff --git a/app/views/clusters/clusters/user/_form.html.haml b/app/views/clusters/clusters/user/_form.html.haml index 29af79cee5f..2dd15ebd266 100644 --- a/app/views/clusters/clusters/user/_form.html.haml +++ b/app/views/clusters/clusters/user/_form.html.haml @@ -1,6 +1,6 @@ -- more_info_link = link_to _('More information'), help_page_path('user/project/clusters/add_remove_clusters.md', +- more_info_link = link_to _('Learn more.'), help_page_path('user/project/clusters/add_remove_clusters.md', anchor: 'add-existing-cluster'), target: '_blank', rel: 'noopener noreferrer' -- rbac_help_link = link_to _('More information'), help_page_path('user/project/clusters/add_remove_clusters.md', +- rbac_help_link = link_to _('Learn more.'), help_page_path('user/project/clusters/add_remove_clusters.md', anchor: 'access-controls'), target: '_blank', rel: 'noopener noreferrer' - api_url_help_text = s_('ClusterIntegration|The URL used to access the Kubernetes API.') @@ -47,13 +47,13 @@ label_class: 'label-bold' } .form-text.text-muted = s_('ClusterIntegration|Allow GitLab to manage namespaces and service accounts for this cluster.') - = link_to _('More information'), help_page_path('user/project/clusters/gitlab_managed_clusters.md'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('user/project/clusters/gitlab_managed_clusters.md'), target: '_blank', rel: 'noopener noreferrer' .form-group = field.check_box :namespace_per_environment, { label: s_('ClusterIntegration|Namespace per environment'), label_class: 'label-bold' } .form-text.text-muted = s_('ClusterIntegration|Deploy each environment to its own namespace. Otherwise, environments within a project share a project-wide namespace. Note that anyone who can trigger a deployment of a namespace can read its secrets. If modified, existing environments will use their current namespaces until the cluster cache is cleared.') - = link_to _('More information'), help_page_path('user/project/clusters/deploy_to_cluster.md', anchor: 'custom-namespace'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('user/project/clusters/deploy_to_cluster.md', anchor: 'custom-namespace'), target: '_blank', rel: 'noopener noreferrer' = field.fields_for :platform_kubernetes, @user_cluster.platform_kubernetes do |platform_kubernetes_field| - if @user_cluster.allow_user_defined_namespace? |