Commit 3e87f537 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Fix spelling, specs and codestyle in Geo flash notice.

parent 3bef58b4
......@@ -14,6 +14,6 @@ class Admin::ApplicationController < ApplicationController
def display_geo_information
return unless Gitlab::Geo.secondary?
primary_node = link_to('primary node', Gitlab::Geo.primary_node.url)
flash.now[:notice] = "You are in a Geo secondary node (read-only). To make any change you must visit the #{primary_node}.".html_safe
flash.now[:notice] = "You are on a secondary (read-only) Geo node. If you want to make any changes, you must visit the #{primary_node}.".html_safe
end
end
......@@ -46,8 +46,10 @@ class Oauth::GeoAuthController < ActionController::Base
private
def after_sign_in_with_gitlab(token, return_to)
primary_node = link_to('primary node', Gitlab::Geo.primary_node.url)
flash[:notice] = "You are in a Geo secondary node (read-only). To make any change you must visit the #{primary_node}.".html_safe
if Gitlab::Geo.primary_node
primary_node = link_to('primary node', Gitlab::Geo.primary_node.url)
flash.now[:notice] = "You are on a secondary (read-only) Geo node. If you want to make any changes, you must visit the #{primary_node}.".html_safe
end
session[:access_token] = token
redirect_to(return_to || root_path)
......
......@@ -33,7 +33,7 @@
- if Gitlab::Geo.secondary?
%li
= link_to Gitlab::Geo.primary_node.url, title: 'Go to primary node', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
=icon('globe fw')
= icon('globe fw')
- if current_user.can_create_project?
%li
= link_to new_project_path, title: 'New project', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
......
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