Commit d4bd9ac3 authored by Zack Cuddy's avatar Zack Cuddy

Hide New node Button

Use link instead of button

Linting

Changelog

Tests

Single quotes
parent 537a6670
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
.d-flex.align-items-center.border-bottom.border-default.mb-4 .d-flex.align-items-center.border-bottom.border-default.mb-4
%h2.page-title %h2.page-title
= _("Geo Nodes") = _("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 %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') } = 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') }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= image_tag 'illustrations/gitlab_geo.svg' = image_tag 'illustrations/gitlab_geo.svg'
.col-12 .col-12
.text-content .text-content
%h4.text-center= _("Discover GitLab Geo") %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.") %p
.text-center = _('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 _('Learn more'), 'https://about.gitlab.com/features/gitlab-geo/', rel: 'nofollow', class: 'btn btn-success' = link_to _('More information'), 'https://about.gitlab.com/features/gitlab-geo/', rel: 'nofollow'
---
title: Update Explore Geo Page
merge_request: 21448
author:
type: changed
...@@ -199,4 +199,22 @@ describe 'admin Geo Nodes', :js, :geo do ...@@ -199,4 +199,22 @@ describe 'admin Geo Nodes', :js, :geo do
expect(page).not_to have_css('.card') expect(page).not_to have_css('.card')
end end
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 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