Fix overview page server information bug
The frontend displays "--" as the default state when
static values are null.
When backend returns an empty string for server model,
serial number, manufacturer or firmware version, then
return "--" to follow the current default state pattern.
Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: Ica0d864993d7124598c09c5bd33d0313d84059db
diff --git a/src/views/Overview/Overview.vue b/src/views/Overview/Overview.vue
index fa7f524..ba93413 100644
--- a/src/views/Overview/Overview.vue
+++ b/src/views/Overview/Overview.vue
@@ -110,16 +110,20 @@
powerCapValue: state => state.powerControl.powerCapValue,
powerConsumptionValue: state => state.powerControl.powerConsumptionValue,
serverManufacturer() {
- return this.server ? this.server.manufacturer : '--';
+ if (this.server) return this.server.manufacturer || '--';
+ return '--';
},
serverModel() {
- return this.server ? this.server.model : '--';
+ if (this.server) return this.server.model || '--';
+ return '--';
},
serverSerialNumber() {
- return this.server ? this.server.serialNumber : '--';
+ if (this.server) return this.server.serialNumber || '--';
+ return '--';
},
hostFirmwareVersion() {
- return this.server ? this.server.firmwareVersion : '--';
+ if (this.server) return this.server.firmwareVersion || '--';
+ return '--';
}
}),
created() {