Commit e1792086 authored by Annabel Gray's avatar Annabel Gray

Merge branch '4966-geo-secondary-banner-styling' into 'master'

Update read-only message banner styling for Geo secondary node

Closes #4966

See merge request gitlab-org/gitlab-ee!6135
parents f62e09e7 7a11fd15
...@@ -10,6 +10,20 @@ ...@@ -10,6 +10,20 @@
@extend .alert; @extend .alert;
background-color: $blue-500; background-color: $blue-500;
margin: 0; margin: 0;
&.flash-notice-persistent {
background-color: $blue-100;
color: $gl-text-color;
a {
color: $gl-link-color;
&:hover {
color: $gl-link-hover-color;
text-decoration: none;
}
}
}
} }
.flash-warning { .flash-warning {
......
...@@ -6,7 +6,7 @@ module EE ...@@ -6,7 +6,7 @@ module EE
def read_only_message def read_only_message
return super unless ::Gitlab::Geo.secondary_with_primary? return super unless ::Gitlab::Geo.secondary_with_primary?
(_('You are on a secondary (read-only) Geo node. If you want to make any changes, you must visit the %{primary_node}.') % (_('You are on a secondary, <b>read-only</b> Geo node. If you want to make changes, you must visit this page on the %{primary_node}.') %
{ primary_node: link_to('primary node', ::Gitlab::Geo.primary_node.url) }).html_safe { primary_node: link_to('primary node', ::Gitlab::Geo.primary_node.url) }).html_safe
end end
......
- message = read_only_message
- if message
.flash-container.flash-container-page
.flash-notice.flash-notice-persistent
%div{ class: (container_class) }
%span
= message
---
title: Update read-only message banner styling for Geo secondary node
merge_request: 6135
author:
type: changed
...@@ -17,12 +17,12 @@ feature 'GEO Nodes' do ...@@ -17,12 +17,12 @@ feature 'GEO Nodes' do
describe "showing Flash Info Message" do describe "showing Flash Info Message" do
it 'on dashboard' do it 'on dashboard' do
visit root_dashboard_path visit root_dashboard_path
expect(page).to have_content 'You are on a secondary (read-only) Geo node.' expect(page).to have_content 'You are on a secondary, read-only Geo node. If you want to make changes, you must visit this page on the primary node.'
end end
it 'on project overview' do it 'on project overview' do
visit project_path(project) visit project_path(project)
expect(page).to have_content 'You are on a secondary (read-only) Geo node.' expect(page).to have_content 'You are on a secondary, read-only Geo node. If you want to make changes, you must visit this page on the primary node.'
end end
end end
end end
......
...@@ -16,6 +16,6 @@ describe 'Geo read-only message' do ...@@ -16,6 +16,6 @@ describe 'Geo read-only message' do
visit root_dashboard_path visit root_dashboard_path
expect(page).to have_content('You are on a secondary (read-only) Geo node') expect(page).to have_content('You are on a secondary, read-only Geo node. If you want to make changes, you must visit this page on the primary node.')
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