Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9e19864b
Commit
9e19864b
authored
Sep 21, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix navigation issues when primary Geo node has been destroyed
parent
59652761
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
app/controllers/admin/application_controller.rb
app/controllers/admin/application_controller.rb
+1
-0
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+1
-1
No files found.
app/controllers/admin/application_controller.rb
View file @
9e19864b
...
@@ -12,6 +12,7 @@ class Admin::ApplicationController < ApplicationController
...
@@ -12,6 +12,7 @@ class Admin::ApplicationController < ApplicationController
def
display_geo_information
def
display_geo_information
return
unless
Gitlab
::
Geo
.
secondary?
return
unless
Gitlab
::
Geo
.
secondary?
return
unless
Gitlab
::
Geo
.
primary_node
.
present?
primary_node
=
view_context
.
link_to
(
'primary node'
,
Gitlab
::
Geo
.
primary_node
.
url
)
primary_node
=
view_context
.
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
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
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
9e19864b
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
=
link_to
sherlock_transactions_path
,
class:
'admin-icon'
,
title:
'Sherlock Transactions'
,
=
link_to
sherlock_transactions_path
,
class:
'admin-icon'
,
title:
'Sherlock Transactions'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'tachometer fw'
)
=
icon
(
'tachometer fw'
)
-
if
Gitlab
::
Geo
.
secondary?
-
if
Gitlab
::
Geo
.
secondary?
&&
Gitlab
::
Geo
.
primary_node
.
present?
%li
%li
=
link_to
Gitlab
::
Geo
.
primary_node
.
url
,
title:
'Go to primary node'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
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'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment