diff options
author | Konstantin Aladyshev <aladyshev22@gmail.com> | 2022-11-02 17:32:04 +0300 |
---|---|---|
committer | Konstantin Aladyshev <aladyshev22@gmail.com> | 2022-11-11 09:48:01 +0300 |
commit | b24a483eda5ca0b0ecdb4f0c61b90d76d0d8e1e0 (patch) | |
tree | a5a26ca20db8e62998296c8104e368369ec3d627 /src/views/HardwareStatus/Inventory | |
parent | 946535f39b6e8f33505659e5eaf300632451d1db (diff) | |
download | webui-vue-b24a483eda5ca0b0ecdb4f0c61b90d76d0d8e1e0.tar.xz |
Display DIMM identify LED element only if LED is present
If identify LED for the DIMM module is not present, don't display
control element for it.
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Change-Id: I30f7e3ad9333874bbeb2050c421baf509bb833fc
Diffstat (limited to 'src/views/HardwareStatus/Inventory')
-rw-r--r-- | src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue b/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue index 65994810..c05ae734 100644 --- a/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue +++ b/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue @@ -53,6 +53,7 @@ <!-- Toggle identify LED --> <template #cell(identifyLed)="row"> <b-form-checkbox + v-if="hasIdentifyLed(row.item.identifyLed)" v-model="row.item.identifyLed" name="switch" switch @@ -63,6 +64,7 @@ </span> <span v-else> {{ $t('global.status.off') }} </span> </b-form-checkbox> + <div v-else>--</div> </template> <template #row-details="{ item }"> <b-container fluid> @@ -250,6 +252,9 @@ export default { }) .catch(({ message }) => this.errorToast(message)); }, + hasIdentifyLed(identifyLed) { + return typeof identifyLed === 'boolean'; + }, }, }; </script> |