diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/application_settings/_signin.html.haml | 2 | ||||
-rw-r--r-- | app/views/clusters/clusters/_advanced_settings_container.html.haml | 6 | ||||
-rw-r--r-- | app/views/clusters/clusters/_advanced_settings_tab.html.haml | 6 | ||||
-rw-r--r-- | app/views/clusters/clusters/_applications.html.haml | 1 | ||||
-rw-r--r-- | app/views/clusters/clusters/_applications_tab.html.haml | 5 | ||||
-rw-r--r-- | app/views/clusters/clusters/_configure.html.haml | 26 | ||||
-rw-r--r-- | app/views/clusters/clusters/_details.html.haml | 11 | ||||
-rw-r--r-- | app/views/clusters/clusters/_details_tab.html.haml | 5 | ||||
-rw-r--r-- | app/views/clusters/clusters/_gitlab_integration_form.html.haml (renamed from app/views/clusters/clusters/_form.html.haml) | 19 | ||||
-rw-r--r-- | app/views/clusters/clusters/_provider_details_form.html.haml (renamed from app/views/clusters/platforms/kubernetes/_form.html.haml) | 2 | ||||
-rw-r--r-- | app/views/clusters/clusters/show.html.haml | 22 |
11 files changed, 63 insertions, 42 deletions
diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml index 0e45301b598..007cd343339 100644 --- a/app/views/admin/application_settings/_signin.html.haml +++ b/app/views/admin/application_settings/_signin.html.haml @@ -16,7 +16,7 @@ Password authentication enabled for Git over HTTP(S) .form-text.text-muted When disabled, a Personal Access Token - - if Gitlab::Auth::LDAP::Config.enabled? + - if Gitlab::Auth::Ldap::Config.enabled? or LDAP password must be used to authenticate. - if omniauth_enabled? && button_based_providers.any? diff --git a/app/views/clusters/clusters/_advanced_settings_container.html.haml b/app/views/clusters/clusters/_advanced_settings_container.html.haml new file mode 100644 index 00000000000..8aae9bfa462 --- /dev/null +++ b/app/views/clusters/clusters/_advanced_settings_container.html.haml @@ -0,0 +1,6 @@ +- if can_admin_cluster?(current_user, @cluster) + .settings.expanded.border-0.m-0 + %p + = s_('ClusterIntegration|Advanced options on this Kubernetes cluster’s integration') + .settings-content#advanced-settings-section + = render 'clusters/clusters/advanced_settings' diff --git a/app/views/clusters/clusters/_advanced_settings_tab.html.haml b/app/views/clusters/clusters/_advanced_settings_tab.html.haml new file mode 100644 index 00000000000..b491a64e43d --- /dev/null +++ b/app/views/clusters/clusters/_advanced_settings_tab.html.haml @@ -0,0 +1,6 @@ +- active = params[:tab] == 'settings' + +- if can_admin_cluster?(current_user, @cluster) + %li.nav-item{ role: 'presentation' } + %a#cluster-settings-tab.nav-link{ class: active_when(active), href: clusterable.cluster_path(@cluster.id, params: {tab: 'settings'}) } + %span= _('Advanced Settings') diff --git a/app/views/clusters/clusters/_applications.html.haml b/app/views/clusters/clusters/_applications.html.haml new file mode 100644 index 00000000000..f83a414a0aa --- /dev/null +++ b/app/views/clusters/clusters/_applications.html.haml @@ -0,0 +1 @@ +.cluster-applications-table#js-cluster-applications diff --git a/app/views/clusters/clusters/_applications_tab.html.haml b/app/views/clusters/clusters/_applications_tab.html.haml new file mode 100644 index 00000000000..e1455b0f60a --- /dev/null +++ b/app/views/clusters/clusters/_applications_tab.html.haml @@ -0,0 +1,5 @@ +- active = params[:tab] == 'apps' + +%li.nav-item{ role: 'presentation' } + %a#cluster-apps-tab.nav-link.qa-applications{ class: active_when(active), href: clusterable.cluster_path(@cluster.id, params: {tab: 'apps'}) } + %span= _('Applications') diff --git a/app/views/clusters/clusters/_configure.html.haml b/app/views/clusters/clusters/_configure.html.haml deleted file mode 100644 index 4ce00c67866..00000000000 --- a/app/views/clusters/clusters/_configure.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -%section#cluster-integration - - unless @cluster.status_name.in? %i/scheduled creating/ - = render 'form' - -- unless @cluster.status_name.in? %i/scheduled creating/ - = render_if_exists 'projects/clusters/prometheus_graphs' - - .cluster-applications-table#js-cluster-applications - - %section.settings#js-cluster-details{ class: ('expanded' if expanded) } - .settings-header - %h4= s_('ClusterIntegration|Kubernetes cluster details') - %button.btn.js-settings-toggle{ type: 'button' } - = expanded ? _('Collapse') : _('Expand') - %p= s_('ClusterIntegration|See and edit the details for your Kubernetes cluster') - .settings-content - = render 'clusters/platforms/kubernetes/form', cluster: @cluster, platform: @cluster.platform_kubernetes, update_cluster_url_path: clusterable.cluster_path(@cluster) - - %section.settings.no-animate#js-cluster-advanced-settings{ class: ('expanded' if expanded) } - .settings-header - %h4= _('Advanced settings') - %button.btn.js-settings-toggle{ type: 'button' } - = expanded ? _('Collapse') : _('Expand') - %p= s_("ClusterIntegration|Advanced options on this Kubernetes cluster's integration") - .settings-content#advanced-settings-section - = render 'advanced_settings' diff --git a/app/views/clusters/clusters/_details.html.haml b/app/views/clusters/clusters/_details.html.haml new file mode 100644 index 00000000000..fb0a1aaebc4 --- /dev/null +++ b/app/views/clusters/clusters/_details.html.haml @@ -0,0 +1,11 @@ +%section#cluster-integration + = render 'gitlab_integration_form' + + %section.settings.no-animate{ class: ('expanded' if expanded) } + .settings-header + %h4= s_('ClusterIntegration|Provider details') + %button.btn.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p= s_('ClusterIntegration|See and edit the details for your Kubernetes cluster') + .settings-content + = render 'provider_details_form', cluster: @cluster, platform: @cluster.platform_kubernetes, update_cluster_url_path: clusterable.cluster_path(@cluster) diff --git a/app/views/clusters/clusters/_details_tab.html.haml b/app/views/clusters/clusters/_details_tab.html.haml new file mode 100644 index 00000000000..564c5103d34 --- /dev/null +++ b/app/views/clusters/clusters/_details_tab.html.haml @@ -0,0 +1,5 @@ +- active = params[:tab] == 'details' || !params[:tab].present? + +%li.nav-item{ role: 'presentation' } + %a#cluster-details-tab.nav-link.qa-details{ class: active_when(active), href: clusterable.cluster_path(@cluster.id, params: {tab: 'details'}) } + %span= _('Details') diff --git a/app/views/clusters/clusters/_form.html.haml b/app/views/clusters/clusters/_gitlab_integration_form.html.haml index 40fc7d110fc..2489f78b403 100644 --- a/app/views/clusters/clusters/_form.html.haml +++ b/app/views/clusters/clusters/_gitlab_integration_form.html.haml @@ -1,11 +1,12 @@ -= form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster, html: { class: 'cluster_integration_form' } do |field| += form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster, html: { class: 'js-cluster-integration-form' } do |field| = form_errors(@cluster) .form-group - %h5= s_('ClusterIntegration|Integration status') - %label.append-bottom-0.js-cluster-enable-toggle-area - = render "shared/buttons/project_feature_toggle", is_checked: @cluster.enabled?, label: s_("ClusterIntegration|Toggle Kubernetes cluster"), disabled: !can?(current_user, :update_cluster, @cluster), data: { qa_selector: 'integration_status_toggle' } do - = field.hidden_field :enabled, { class: 'js-project-feature-toggle-input'} - .form-text.text-muted= s_('ClusterIntegration|Enable or disable GitLab\'s connection to your Kubernetes cluster.') + .d-flex.align-items-center + %h4.pr-2.m-0 + = s_('ClusterIntegration|GitLab Integration') + %label.append-bottom-0.js-cluster-enable-toggle-area{ title: s_('ClusterIntegration|Enable or disable GitLab\'s connection to your Kubernetes cluster.'), data: { toggle: 'tooltip', container: 'body' } } + = render "shared/buttons/project_feature_toggle", is_checked: @cluster.enabled?, label: s_("ClusterIntegration|Toggle Kubernetes cluster"), disabled: !can?(current_user, :update_cluster, @cluster), data: { qa_selector: 'integration_status_toggle' } do + = field.hidden_field :enabled, { class: 'js-project-feature-toggle-input'} .form-group %h5= s_('ClusterIntegration|Environment scope') @@ -17,7 +18,8 @@ - environment_scope_url = help_page_path('user/project/clusters/index', anchor: 'base-domain') - environment_scope_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: environment_scope_url } .form-text.text-muted - %code * + %code + = _('*') = s_("ClusterIntegration| is the default environment scope for this cluster. This means that all jobs, regardless of their environment, will use this cluster. %{environment_scope_start}More information%{environment_scope_end}").html_safe % { environment_scope_start: environment_scope_start, environment_scope_end: '</a>'.html_safe } .form-group @@ -29,7 +31,8 @@ = s_('ClusterIntegration|Specifying a domain will allow you to use Auto Review Apps and Auto Deploy stages for %{auto_devops_start}Auto DevOps%{auto_devops_end}. The domain should have a wildcard DNS configured matching the domain.').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe } %span{ :class => ["js-ingress-domain-help-text", ("hide" unless @cluster.application_ingress_external_ip.present?)] } = s_('ClusterIntegration|Alternatively') - %code{ :class => "js-ingress-domain-snippet" } #{@cluster.application_ingress_external_ip}.nip.io + %code{ :class => "js-ingress-domain-snippet" } + = s_('ClusterIntegration|%{external_ip}.nip.io').html_safe % { external_ip: @cluster.application_ingress_external_ip } = s_('ClusterIntegration| can be used instead of a custom domain.') - custom_domain_url = help_page_path('user/clusters/applications.md', anchor: 'pointing-your-dns-at-the-external-endpoint') - custom_domain_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: custom_domain_url } diff --git a/app/views/clusters/platforms/kubernetes/_form.html.haml b/app/views/clusters/clusters/_provider_details_form.html.haml index 41701b5614a..dd7d6182e3c 100644 --- a/app/views/clusters/platforms/kubernetes/_form.html.haml +++ b/app/views/clusters/clusters/_provider_details_form.html.haml @@ -1,4 +1,4 @@ -= bootstrap_form_for cluster, url: update_cluster_url_path, html: { class: 'gl-show-field-errors' }, += bootstrap_form_for cluster, url: update_cluster_url_path, html: { class: 'js-provider-details gl-show-field-errors' }, as: :cluster do |field| - copy_name_btn = clipboard_button(text: cluster.name, title: s_('ClusterIntegration|Copy Kubernetes cluster name'), class: 'input-group-text btn-default') if cluster.read_only_kubernetes_platform_fields? diff --git a/app/views/clusters/clusters/show.html.haml b/app/views/clusters/clusters/show.html.haml index e1f011a3225..4aa5b6af636 100644 --- a/app/views/clusters/clusters/show.html.haml +++ b/app/views/clusters/clusters/show.html.haml @@ -5,8 +5,6 @@ - manage_prometheus_path = edit_project_service_path(@cluster.project, 'prometheus') if @project - cluster_environments_path = clusterable.environments_cluster_path(@cluster) -- expanded = expanded_by_default? - - status_path = clusterable.cluster_status_cluster_path(@cluster.id, format: :json) if can?(current_user, :admin_cluster, @cluster) .edit-cluster-form.js-edit-cluster-form{ data: { status_path: status_path, install_helm_path: clusterable.install_applications_cluster_path(@cluster, :helm), @@ -44,7 +42,19 @@ %h4= @cluster.name = render 'banner' - - if cluster_environments_path.present? - = render_if_exists 'clusters/clusters/cluster_environments', expanded: expanded - - else - = render 'configure', expanded: expanded + - if cluster_created?(@cluster) + .js-toggle-container + %ul.nav-links.mobile-separator.nav.nav-tabs{ role: 'tablist' } + = render 'details_tab' + = render_if_exists 'clusters/clusters/environments_tab' + = render_if_exists 'clusters/clusters/health_tab' + = render 'applications_tab' + = render 'advanced_settings_tab' + + .tab-content.py-3 + .tab-pane.active{ role: 'tabpanel' } + = render_cluster_info_tab_content(params[:tab], expanded_by_default?) + + + + |