summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlukhov Mikhail <mikl@greenfil.ru>2024-01-09 15:04:58 +0300
committerGlukhov Mikhail <mikl@greenfil.ru>2024-03-07 07:32:32 +0300
commitf44b3fcceb3cc646fefb475c35c052f1be2aabbc (patch)
treebda37b17fe955c461aecc6790bd8fe59bf6c752a
parent0b4c447d2c113179b99dc9fd29aed8dc4ac06498 (diff)
downloadwebui-vue-f44b3fcceb3cc646fefb475c35c052f1be2aabbc.tar.xz
Added State columns for the processor table
When a processor is present: Old behavior: Health = Ok (green color) New behavior: Health = Ok (green color), State = Enabled (green color) In the absence of a processor: Old behavior: Health = Critical (error red color) New behavior: Health = Ok (green color), State = Absent (warning yellow) Tested manually on my system with 1 CPU present and 1 CPU missing Change-Id: I33f8d94cbb5dcfd6a33b4b3ca379d2323362caca Signed-off-by: Glukhov Mikhail <mikl@greenfil.ru>
-rw-r--r--src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue b/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue
index 793dbd86..07376a5b 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue
@@ -48,6 +48,11 @@
<status-icon :status="statusIcon(value)" />
{{ value }}
</template>
+ <!-- StatusState -->
+ <template #cell(statusState)="{ value }">
+ <status-icon :status="statusStateIcon(value)" />
+ {{ value }}
+ </template>
<!-- Toggle identify LED -->
<template #cell(identifyLed)="row">
@@ -201,6 +206,13 @@ export default {
tdClass: 'text-nowrap',
},
{
+ key: 'statusState',
+ label: this.$t('pageInventory.table.state'),
+ formatter: this.dataFormatter,
+ sortable: true,
+ tdClass: 'text-nowrap',
+ },
+ {
key: 'locationNumber',
label: this.$t('pageInventory.table.locationNumber'),
formatter: this.dataFormatter,
@@ -252,6 +264,16 @@ export default {
hasIdentifyLed(identifyLed) {
return typeof identifyLed === 'boolean';
},
+ statusStateIcon(status) {
+ switch (status) {
+ case 'Enabled':
+ return 'success';
+ case 'Absent':
+ return 'warning';
+ default:
+ return '';
+ }
+ },
},
};
</script>