Commit e9c288ca authored by anna_vovchenko's avatar anna_vovchenko Committed by Anna Vovchenko

Implemented suggested changes

- removed learn more link
- updated sidebar title
- changed action menu items text
parent 5a46295c
......@@ -257,8 +257,8 @@ export const CLUSTERS_ACTIONS = {
connectClusterDeprecated: s__('ClusterAgents|Connect a cluster (deprecated)'),
createClusterDeprecated: s__('ClusterAgents|Create a cluster (deprecated)'),
createCluster: s__('ClusterAgents|Create a cluster'),
createClusterCertificate: s__('ClusterAgents|Create a cluster (certificate) (deprecated)'),
connectClusterCertificate: s__('ClusterAgents|Connect a cluster (certificate) (deprecated)'),
createClusterCertificate: s__('ClusterAgents|Create a cluster (certificate - deprecated)'),
connectClusterCertificate: s__('ClusterAgents|Connect a cluster (certificate - deprecated)'),
dropdownDisabledHint: s__(
'ClusterAgents|Requires a Maintainer or greater role to perform these actions',
),
......
......@@ -31,7 +31,7 @@ class GroupClusterablePresenter < ClusterablePresenter
end
override :learn_more_link
def learn_more_link(docs_mode = false)
def learn_more_link
ApplicationController.helpers.link_to(s_('ClusterIntegration|Learn more about group Kubernetes clusters'), help_page_path('user/group/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
end
......
......@@ -79,7 +79,7 @@ class InstanceClusterablePresenter < ClusterablePresenter
end
override :learn_more_link
def learn_more_link(docs_mode = false)
def learn_more_link
ApplicationController.helpers.link_to(s_('ClusterIntegration|Learn more about instance Kubernetes clusters'), help_page_path('user/instance/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
end
......
......@@ -26,13 +26,9 @@ class ProjectClusterablePresenter < ClusterablePresenter
end
override :learn_more_link
def learn_more_link(docs_mode = false)
if docs_mode
ApplicationController.helpers.link_to(s_('ClusterIntegration|Learn more about GitLab integrations with Kubernetes'), help_page_path('user/infrastructure/iac/index', anchor: 'create-a-new-cluster-through-iac'), target: '_blank', rel: 'noopener noreferrer')
else
def learn_more_link
ApplicationController.helpers.link_to(s_('ClusterIntegration|Learn more about Kubernetes.'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
end
end
def metrics_dashboard_path(cluster)
metrics_dashboard_project_cluster_path(clusterable, cluster)
......
- 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(docs_mode)
- if !docs_mode
%p
= clusterable.learn_more_link
= render 'clusters/clusters/multiple_clusters_message'
......@@ -5,7 +5,7 @@
.gl-md-display-flex.gl-mt-3
.gl-w-quarter.gl-xs-w-full.gl-flex-shrink-0.gl-md-mr-5
= render 'sidebar'
= render 'sidebar', is_connect_page: true
.gl-w-full
#js-cluster-new{ data: js_cluster_new }
= render 'clusters/clusters/user/form'
......@@ -8,7 +8,7 @@
.gl-md-display-flex.gl-mt-3
.gl-w-quarter.gl-xs-w-full.gl-flex-shrink-0.gl-md-mr-5
= render 'sidebar'
= render 'sidebar', is_connect_page: false
.gl-w-full
= render 'clusters/clusters/cloud_providers/cloud_provider_selector'
......
......@@ -8,6 +8,6 @@
.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
= 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
......@@ -7879,7 +7879,7 @@ msgstr ""
msgid "ClusterAgents|Connect a cluster (agent)"
msgstr ""
msgid "ClusterAgents|Connect a cluster (certificate) (deprecated)"
msgid "ClusterAgents|Connect a cluster (certificate - deprecated)"
msgstr ""
msgid "ClusterAgents|Connect a cluster (deprecated)"
......@@ -7909,7 +7909,7 @@ msgstr ""
msgid "ClusterAgents|Create a cluster"
msgstr ""
msgid "ClusterAgents|Create a cluster (certificate) (deprecated)"
msgid "ClusterAgents|Create a cluster (certificate - deprecated)"
msgstr ""
msgid "ClusterAgents|Create a cluster (deprecated)"
......@@ -8295,6 +8295,9 @@ msgstr ""
msgid "ClusterIntegration|Create Kubernetes cluster"
msgstr ""
msgid "ClusterIntegration|Create a Kubernetes cluster"
msgstr ""
msgid "ClusterIntegration|Creating Kubernetes cluster"
msgstr ""
......@@ -8451,9 +8454,6 @@ msgstr ""
msgid "ClusterIntegration|Learn more about %{help_link_start}zones%{help_link_end}."
msgstr ""
msgid "ClusterIntegration|Learn more about GitLab integrations with Kubernetes"
msgstr ""
msgid "ClusterIntegration|Learn more about Kubernetes."
msgstr ""
......
......@@ -20,7 +20,7 @@ RSpec.describe 'AWS EKS Cluster', :js do
visit project_clusters_path(project)
click_button(class: 'dropdown-toggle-split')
click_link 'Create a cluster (certificate) (deprecated)'
click_link 'Create a cluster (certificate - deprecated)'
end
context 'when user creates a cluster on AWS EKS' do
......
......@@ -135,7 +135,7 @@ RSpec.describe 'Gcp Cluster', :js do
visit project_clusters_path(project)
click_button(class: 'dropdown-toggle-split')
click_link 'Connect a cluster (certificate) (deprecated)'
click_link 'Connect a cluster (certificate - deprecated)'
end
it 'user sees the "Environment scope" field' do
......@@ -220,6 +220,6 @@ RSpec.describe 'Gcp Cluster', :js do
def visit_create_cluster_page
click_button(class: 'dropdown-toggle-split')
click_link 'Create a cluster (certificate) (deprecated)'
click_link 'Create a cluster (certificate - deprecated)'
end
end
......@@ -222,11 +222,11 @@ RSpec.describe 'Clusters', :js do
visit project_clusters_path(project)
click_button(class: 'dropdown-toggle-split')
click_link 'Create a cluster (certificate) (deprecated)'
click_link 'Create a cluster (certificate - deprecated)'
end
def visit_connect_cluster_page
click_button(class: 'dropdown-toggle-split')
click_link 'Connect a cluster (certificate) (deprecated)'
click_link 'Connect a cluster (certificate - deprecated)'
end
end
......@@ -98,18 +98,8 @@ RSpec.describe ProjectClusterablePresenter do
end
describe '#learn_more_link' do
subject { presenter.learn_more_link(docs_mode) }
context 'feature flag is enabled' do
let(:docs_mode) { true }
it { is_expected.to include('help/user/infrastructure/iac/index#create-a-new-cluster-through-iac') }
end
context 'feature flag is disabled' do
let(:docs_mode) { false }
subject { presenter.learn_more_link }
it { is_expected.to include('user/project/clusters/index') }
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