Commit 89f37e80 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Add node_class

parent e9c17f39
......@@ -16,6 +16,13 @@ module EE
end
end
def node_class(node)
klass = []
klass << 'js-geo-secondary-node' if node.secondary?
klass << ' node-disabled' unless node.enabled?
klass
end
def toggle_node_button(node)
btn_class, title, data =
if node.enabled?
......
......@@ -16,7 +16,7 @@
Geo nodes (#{@nodes.count})
%ul.well-list.geo-nodes
- @nodes.each do |node|
%li{ id: dom_id(node), class: ('js-geo-secondary-node' if node.secondary?; 'node-disabled' if node.enabled? == false), data: { status_url: status_admin_geo_node_path(node) } }
%li{ id: dom_id(node), class: node_class(node), data: { status_url: status_admin_geo_node_path(node) } }
.node-block
= node_status_icon(node)
%strong= node.url
......
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