Commit 71e26d3a authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Only show actions and primary label on primary node; hide error if healthy

parent 056ddf5c
...@@ -37,7 +37,9 @@ class GeoNodeStatus { ...@@ -37,7 +37,9 @@ class GeoNodeStatus {
this.$repositoriesFailed.html(status.repositories_failed_count); this.$repositoriesFailed.html(status.repositories_failed_count);
this.$lfsObjectsSynced.html(`${status.lfs_objects_synced_count}/${status.lfs_objects_count} (${status.lfs_objects_synced_in_percentage})`); this.$lfsObjectsSynced.html(`${status.lfs_objects_synced_count}/${status.lfs_objects_count} (${status.lfs_objects_synced_in_percentage})`);
this.$attachmentsSynced.html(`${status.attachments_synced_count}/${status.attachments_count} (${status.attachments_synced_in_percentage})`); this.$attachmentsSynced.html(`${status.attachments_synced_count}/${status.attachments_count} (${status.attachments_synced_in_percentage})`);
if (status.health !== 'Healthy') { if (status.health === 'Healthy') {
this.$health.html('');
} else {
this.$health.html(`<code class="geo-health">${status.health}</code>`); this.$health.html(`<code class="geo-health">${status.health}</code>`);
} }
......
...@@ -18,7 +18,7 @@ module EE ...@@ -18,7 +18,7 @@ module EE
def node_class(node) def node_class(node)
klass = [] klass = []
klass << 'js-geo-secondary-node' if node.secondary? klass << 'js-geo-secondary-node' if node.secondary?
klass << ' node-disabled' unless node.enabled? klass << 'node-disabled' unless node.enabled?
klass klass
end end
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
.node-block .node-block
= node_status_icon(node) = node_status_icon(node)
%strong= node.url %strong= node.url
- if node.primary?
.node-badge.primary-node Primary
- if current_node?(node) - if current_node?(node)
.node-badge.current-node Current node .node-badge.current-node Current node
- if node.primary?
.node-badge.primary-node Primary
%span.help-block Primary node %span.help-block Primary node
- else - else
.js-geo-node-status{ style: 'display: none' } .js-geo-node-status{ style: 'display: none' }
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
%p %p
.js-health .js-health
- if current_node?(node) == node.primary?
.node-actions .node-actions
- if Gitlab::Geo.license_allows? - if Gitlab::Geo.license_allows?
- if node.missing_oauth_application? - if node.missing_oauth_application?
......
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