Commit 629b6600 authored by Denys Mishunov's avatar Denys Mishunov

Merge branch 'always-show-clear-cluster-cache-button' into 'master'

Always show "Clear cluster cache" button

See merge request gitlab-org/gitlab!43619
parents 2c68de83 6cd98a30
...@@ -26,12 +26,15 @@ ...@@ -26,12 +26,15 @@
= link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank' = link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank'
= field.submit _('Save changes'), class: 'btn btn-success' = field.submit _('Save changes'), class: 'btn btn-success'
- if @cluster.managed?
.sub-section.form-group .sub-section.form-group
%h4 %h4
= s_('ClusterIntegration|Clear cluster cache') = s_('ClusterIntegration|Clear cluster cache')
%p %p
= s_("ClusterIntegration|Clear the local cache of namespace and service accounts. This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts.") = s_("ClusterIntegration|Clear the local cache of namespace and service accounts.")
- if @cluster.managed?
= s_("ClusterIntegration|This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts.")
- else
= s_("ClusterIntegration|This is necessary to clear existing environment-namespace associations from clusters previously managed by GitLab.")
= link_to(s_('ClusterIntegration|Clear cluster cache'), clusterable.clear_cluster_cache_path(@cluster), method: :delete, class: 'btn btn-primary') = link_to(s_('ClusterIntegration|Clear cluster cache'), clusterable.clear_cluster_cache_path(@cluster), method: :delete, class: 'btn btn-primary')
.sub-section.form-group .sub-section.form-group
......
---
title: Always show the "Clear cluster cache" button among the advanced Kubernetes cluster configuration options
merge_request: 43619
author:
type: changed
...@@ -5520,7 +5520,7 @@ msgstr "" ...@@ -5520,7 +5520,7 @@ msgstr ""
msgid "ClusterIntegration|Clear cluster cache" msgid "ClusterIntegration|Clear cluster cache"
msgstr "" msgstr ""
msgid "ClusterIntegration|Clear the local cache of namespace and service accounts. This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts." msgid "ClusterIntegration|Clear the local cache of namespace and service accounts."
msgstr "" msgstr ""
msgid "ClusterIntegration|Cluster management project (alpha)" msgid "ClusterIntegration|Cluster management project (alpha)"
...@@ -6219,6 +6219,12 @@ msgstr "" ...@@ -6219,6 +6219,12 @@ msgstr ""
msgid "ClusterIntegration|This account must have permissions to create a Kubernetes cluster in the %{link_to_container_project} specified below" msgid "ClusterIntegration|This account must have permissions to create a Kubernetes cluster in the %{link_to_container_project} specified below"
msgstr "" msgstr ""
msgid "ClusterIntegration|This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts."
msgstr ""
msgid "ClusterIntegration|This is necessary to clear existing environment-namespace associations from clusters previously managed by GitLab."
msgstr ""
msgid "ClusterIntegration|This option will allow you to install applications on RBAC clusters." msgid "ClusterIntegration|This option will allow you to install applications on RBAC clusters."
msgstr "" msgstr ""
......
...@@ -87,6 +87,7 @@ RSpec.describe 'Clusterable > Show page' do ...@@ -87,6 +87,7 @@ RSpec.describe 'Clusterable > Show page' do
within('#advanced-settings-section') do within('#advanced-settings-section') do
expect(page).to have_content('Google Kubernetes Engine') expect(page).to have_content('Google Kubernetes Engine')
expect(page).to have_content('Manage your Kubernetes cluster by visiting') expect(page).to have_content('Manage your Kubernetes cluster by visiting')
expect_common_advanced_options
end end
end end
end end
...@@ -117,6 +118,7 @@ RSpec.describe 'Clusterable > Show page' do ...@@ -117,6 +118,7 @@ RSpec.describe 'Clusterable > Show page' do
within('#advanced-settings-section') do within('#advanced-settings-section') do
expect(page).not_to have_content('Google Kubernetes Engine') expect(page).not_to have_content('Google Kubernetes Engine')
expect(page).not_to have_content('Manage your Kubernetes cluster by visiting') expect(page).not_to have_content('Manage your Kubernetes cluster by visiting')
expect_common_advanced_options
end end
end end
end end
...@@ -176,4 +178,14 @@ RSpec.describe 'Clusterable > Show page' do ...@@ -176,4 +178,14 @@ RSpec.describe 'Clusterable > Show page' do
let(:cluster) { create(:cluster, :provided_by_user, :instance) } let(:cluster) { create(:cluster, :provided_by_user, :instance) }
end end
end end
private
def expect_common_advanced_options
aggregate_failures do
expect(page).to have_content('Cluster management project')
expect(page).to have_content('Clear cluster cache')
expect(page).to have_content('Remove Kubernetes cluster integration')
end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment