summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Aladyshev <aladyshev22@gmail.com>2022-11-02 17:32:04 +0300
committerKonstantin Aladyshev <aladyshev22@gmail.com>2022-11-11 09:48:01 +0300
commitb24a483eda5ca0b0ecdb4f0c61b90d76d0d8e1e0 (patch)
treea5a26ca20db8e62998296c8104e368369ec3d627
parent946535f39b6e8f33505659e5eaf300632451d1db (diff)
downloadwebui-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
-rw-r--r--src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue5
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>