diff --git a/ee/app/views/admin/geo/nodes/index.html.haml b/ee/app/views/admin/geo/nodes/index.html.haml index 76aa55915a9460bce2d7018e770bf4b633049719..1c765b3ff2bc0802310178ca6c0dd966d4fb8f38 100644 --- a/ee/app/views/admin/geo/nodes/index.html.haml +++ b/ee/app/views/admin/geo/nodes/index.html.haml @@ -6,7 +6,8 @@ .d-flex.align-items-center.border-bottom.border-default.mb-4 %h2.page-title = _("Geo Nodes") - = link_to s_("GeoNodes|New node"), new_admin_geo_node_path, class: 'btn btn-success ml-auto qa-new-node-link' + - if @nodes.any? + = link_to s_("GeoNodes|New node"), new_admin_geo_node_path, class: 'btn btn-success ml-auto qa-new-node-link' %p.page-subtitle.light = s_('GeoNodes|With %{geo} you can install a special read-only and replicated instance anywhere. Before you add nodes, follow the %{instructions} in the exact order they appear.').html_safe % { geo: link_to('GitLab Geo', help_page_path('administration/geo/replication/index.md'), target: '_blank'), instructions: link_to('setup instructions', help_page_path('administration/geo/replication/index.md', anchor: 'setup-instructions'), target: '_blank') } diff --git a/ee/app/views/shared/empty_states/_geo.html.haml b/ee/app/views/shared/empty_states/_geo.html.haml index 2f10bdaa7926f339eb24f18c81a75870b2ee31a1..446647f1cc19a9b1d84d993b6e3eb434626aec17 100644 --- a/ee/app/views/shared/empty_states/_geo.html.haml +++ b/ee/app/views/shared/empty_states/_geo.html.haml @@ -4,7 +4,7 @@ = image_tag 'illustrations/gitlab_geo.svg' .col-12 .text-content - %h4.text-center= _("Discover GitLab Geo") - %p= _("Make everyone on your team more productive regardless of their location. GitLab Geo creates read-only mirrors of your GitLab instance so you can reduce the time it takes to clone and fetch large repos.") - .text-center - = link_to _('Learn more'), 'https://about.gitlab.com/features/gitlab-geo/', rel: 'nofollow', class: 'btn btn-success' + %h4.text-center= _('Discover GitLab Geo') + %p + = _('Make everyone on your team more productive regardless of their location. GitLab Geo creates read-only mirrors of your GitLab instance so you can reduce the time it takes to clone and fetch large repos.') + = link_to _('More information'), 'https://about.gitlab.com/features/gitlab-geo/', rel: 'nofollow' diff --git a/ee/changelogs/unreleased/9233-update-explore-geo-page.yml b/ee/changelogs/unreleased/9233-update-explore-geo-page.yml new file mode 100644 index 0000000000000000000000000000000000000000..5452eebea721cf3db2b2d1c76701d491c576b25f --- /dev/null +++ b/ee/changelogs/unreleased/9233-update-explore-geo-page.yml @@ -0,0 +1,5 @@ +--- +title: Update Explore Geo Page +merge_request: 21448 +author: +type: changed diff --git a/ee/spec/features/admin/geo/admin_geo_nodes_spec.rb b/ee/spec/features/admin/geo/admin_geo_nodes_spec.rb index b1e8afb711cba56c5d086cae41a0141c795623de..2ebde531352bbb5130c8da10d8ca64a3c1c8da7f 100644 --- a/ee/spec/features/admin/geo/admin_geo_nodes_spec.rb +++ b/ee/spec/features/admin/geo/admin_geo_nodes_spec.rb @@ -199,4 +199,22 @@ expect(page).not_to have_css('.card') end end + + describe 'with no Geo Nodes' do + before do + geo_node.delete + visit admin_geo_nodes_path + wait_for_requests + end + + it 'hides the New Node button' do + expect(page).not_to have_link('New node', href: new_admin_geo_node_path) + end + + it 'shows Discover GitLab Geo' do + page.within(find('h4')) do + expect(page).to have_content('Discover GitLab Geo') + end + end + end end