Skip to content
Snippets Groups Projects
Commit d231b36a authored by Stan Hu's avatar Stan Hu
Browse files

Spin globe icon when retrieving Geo node status

Closes #1977
parent 69fd23f8
No related merge requests found
......@@ -3,6 +3,7 @@ import './smart_interval';
const healthyClass = 'geo-node-icon-healthy';
const unhealthyClass = 'geo-node-icon-unhealthy';
const unknownClass = 'geo-node-icon-unknown';
class GeoNodeStatus {
constructor(el) {
......@@ -40,6 +41,9 @@ class GeoNodeStatus {
}
setStatusIcon(healthy) {
this.$icon.removeClass('fa-spin');
this.$icon.removeClass(unknownClass);
if (healthy) {
this.$icon.removeClass(unhealthyClass)
.addClass(healthyClass)
......
......@@ -6,6 +6,10 @@
color: $gl-danger;
}
.geo-node-icon-unknown {
color: $gl-warning;
}
.geo-node-icon-disabled {
color: $gray-darkest;
}
......@@ -4,10 +4,10 @@ def node_status_icon(node)
if node.primary?
icon 'star fw', class: 'has-tooltip', title: 'Primary node'
else
status = node.enabled? ? 'healthy' : 'disabled'
status = node.enabled? ? 'unknown' : 'disabled'
icon 'globe fw',
class: "js-geo-node-icon geo-node-icon-#{status} has-tooltip",
class: "js-geo-node-icon fa-spin geo-node-icon-#{status} has-tooltip",
title: status.capitalize
end
end
......
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