Move code to show the node that you are logged into a helper method

parent ddc94734
module EE
module GeoHelper
def current_node?(node)
::Gitlab::Geo.current_node == node
end
def node_status_icon(node)
unless node.primary?
status = node.enabled? ? 'healthy' : 'disabled'
......
......@@ -22,7 +22,7 @@
%strong= node.url
- if node.primary?
.node-badge.primary-node Primary
- if Gitlab::Geo.current_node == node
- if current_node?(node)
.node-badge.current-node Current node
%span.help-block Primary node
- else
......
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