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 {
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.$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>`);
}
......
......@@ -18,7 +18,7 @@ module EE
def node_class(node)
klass = []
klass << 'js-geo-secondary-node' if node.secondary?
klass << ' node-disabled' unless node.enabled?
klass << 'node-disabled' unless node.enabled?
klass
end
......
......@@ -20,10 +20,10 @@
.node-block
= node_status_icon(node)
%strong= node.url
- if node.primary?
.node-badge.primary-node Primary
- if current_node?(node)
.node-badge.current-node Current node
- if node.primary?
.node-badge.primary-node Primary
%span.help-block Primary node
- else
.js-geo-node-status{ style: 'display: none' }
......@@ -51,10 +51,11 @@
%p
.js-health
.node-actions
- if Gitlab::Geo.license_allows?
- if node.missing_oauth_application?
= link_to "Repair authentication", repair_admin_geo_node_path(node), method: :post, title: 'OAuth application is missing', class: 'btn btn-default btn-sm'
- if node.secondary?
= toggle_node_button(node)
= link_to "Remove", admin_geo_node_path(node), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm'
- if current_node?(node) == node.primary?
.node-actions
- if Gitlab::Geo.license_allows?
- if node.missing_oauth_application?
= link_to "Repair authentication", repair_admin_geo_node_path(node), method: :post, title: 'OAuth application is missing', class: 'btn btn-default btn-sm'
- if node.secondary?
= toggle_node_button(node)
= link_to "Remove", admin_geo_node_path(node), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm'
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