Skip to content

Commit

Permalink
Added State columns for the processor table
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
gluhow committed Mar 7, 2024
1 parent 0b4c447 commit f44b3fc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -200,6 +205,13 @@ export default {
sortable: true,
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'),
Expand Down Expand Up @@ -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>

0 comments on commit f44b3fc

Please sign in to comment.