Commit 11898e1a authored by Stan Hu's avatar Stan Hu

Simplify to .geo-node-mismatch

parent 3ebe67d5
...@@ -14,9 +14,8 @@ const unhealthyIcon = 'fa-times'; ...@@ -14,9 +14,8 @@ const unhealthyIcon = 'fa-times';
const unknownIcon = 'fa-times'; const unknownIcon = 'fa-times';
const notAvailable = 'Not Available'; const notAvailable = 'Not Available';
const versionMismatch = 'Does not match the primary node version'; const versionMismatch = 'Does not match the primary node version';
const versionMismatchClass = 'geo-node-version-mismatch'; const nodeMismatchClass = 'geo-node-mismatch';
const storageMismatch = 'Does not match the primary storage configuration'; const storageMismatch = 'Does not match the primary storage configuration';
const storageMismatchClass = 'geo-node-storage-mismatch';
class GeoNodeStatus { class GeoNodeStatus {
constructor(el) { constructor(el) {
...@@ -207,20 +206,20 @@ class GeoNodeStatus { ...@@ -207,20 +206,20 @@ class GeoNodeStatus {
if (!this.primaryVersion || (this.primaryVersion === status.version if (!this.primaryVersion || (this.primaryVersion === status.version
&& this.primaryRevision === status.revision)) { && this.primaryRevision === status.revision)) {
this.$secondaryVersion.removeClass(`${versionMismatchClass}`); this.$secondaryVersion.removeClass(`${nodeMismatchClass}`);
this.$secondaryVersion.text(`${status.version} (${status.revision})`); this.$secondaryVersion.text(`${status.version} (${status.revision})`);
} else { } else {
this.$secondaryVersion.addClass(`${versionMismatchClass}`); this.$secondaryVersion.addClass(`${nodeMismatchClass}`);
this.$secondaryVersion.text(`${status.version} (${status.revision}) - ${versionMismatch}`); this.$secondaryVersion.text(`${status.version} (${status.revision}) - ${versionMismatch}`);
} }
if (status.storage_shards_match == null) { if (status.storage_shards_match == null) {
this.$secondaryStorage.text('UNKNOWN'); this.$secondaryStorage.text('UNKNOWN');
} else if (status.storage_shards_match) { } else if (status.storage_shards_match) {
this.$secondaryStorage.removeClass(`${storageMismatchClass}`); this.$secondaryStorage.removeClass(`${nodeMismatchClass}`);
this.$secondaryStorage.text('OK'); this.$secondaryStorage.text('OK');
} else { } else {
this.$secondaryStorage.addClass(`${storageMismatchClass}`); this.$secondaryStorage.addClass(`${nodeMismatchClass}`);
this.$secondaryStorage.text(storageMismatch); this.$secondaryStorage.text(storageMismatch);
} }
......
...@@ -127,11 +127,7 @@ ...@@ -127,11 +127,7 @@
} }
} }
.geo-node-version-mismatch { .geo-node-mismatch {
color: $gl-danger;
}
.geo-node-storage-mismatch {
color: $gl-danger; color: $gl-danger;
} }
......
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