diff --git a/src/components/Global/LedComponent.vue b/src/components/Global/LedComponent.vue new file mode 100644 index 0000000000..464d054c4c --- /dev/null +++ b/src/components/Global/LedComponent.vue @@ -0,0 +1,133 @@ + + + + diff --git a/src/store/modules/HardwareStatus/BmcStore.js b/src/store/modules/HardwareStatus/BmcStore.js index bbdf6b1232..c97dd5d981 100644 --- a/src/store/modules/HardwareStatus/BmcStore.js +++ b/src/store/modules/HardwareStatus/BmcStore.js @@ -17,6 +17,7 @@ const BmcStore = { bmc.health = data.Status.Health; bmc.id = data.Id; bmc.identifyLed = data.LocationIndicatorActive; + bmc.ledStatus = data.LocationIndicatorActive; bmc.locationNumber = data.Location?.PartLocation?.ServiceLabel; bmc.model = data.Model; bmc.name = data.Name; diff --git a/src/store/modules/HardwareStatus/FanStore.js b/src/store/modules/HardwareStatus/FanStore.js index dc74214ae2..29d07464f0 100644 --- a/src/store/modules/HardwareStatus/FanStore.js +++ b/src/store/modules/HardwareStatus/FanStore.js @@ -29,6 +29,7 @@ const FanStore = { partNumber: PartNumber, serialNumber: SerialNumber, identifyLed: LocationIndicatorActive, + ledStatus: LocationIndicatorActive, locationNumber: Location?.PartLocation?.ServiceLabel, model: Model, name: Name, diff --git a/src/store/modules/HardwareStatus/PcieSlotsStore.js b/src/store/modules/HardwareStatus/PcieSlotsStore.js index e173270f60..cbd3589982 100644 --- a/src/store/modules/HardwareStatus/PcieSlotsStore.js +++ b/src/store/modules/HardwareStatus/PcieSlotsStore.js @@ -16,6 +16,7 @@ const PcieSlotsStore = { return { type: SlotType, identifyLed: LocationIndicatorActive, + ledStatus: LocationIndicatorActive, locationNumber: Location?.PartLocation?.ServiceLabel, }; }); diff --git a/src/store/modules/HardwareStatus/PowerSupplyStore.js b/src/store/modules/HardwareStatus/PowerSupplyStore.js index 7281cb2820..e783c5efac 100644 --- a/src/store/modules/HardwareStatus/PowerSupplyStore.js +++ b/src/store/modules/HardwareStatus/PowerSupplyStore.js @@ -31,6 +31,7 @@ const PowerSupplyStore = { serialNumber: SerialNumber, firmwareVersion: FirmwareVersion, identifyLed: LocationIndicatorActive, + ledStatus: LocationIndicatorActive, locationNumber: Location?.PartLocation?.ServiceLabel, model: Model, name: Name, diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js index 400c364601..a80458b13f 100644 --- a/src/store/modules/HardwareStatus/ProcessorStore.js +++ b/src/store/modules/HardwareStatus/ProcessorStore.js @@ -38,6 +38,7 @@ const ProcessorStore = { totalCores: TotalCores, locationNumber: Location?.PartLocation?.ServiceLabel, identifyLed: LocationIndicatorActive, + ledStatus: LocationIndicatorActive, uri: processor['@odata.id'], }; }); diff --git a/src/store/modules/HardwareStatus/SystemStore.js b/src/store/modules/HardwareStatus/SystemStore.js index 213e69cb8a..1631af7518 100644 --- a/src/store/modules/HardwareStatus/SystemStore.js +++ b/src/store/modules/HardwareStatus/SystemStore.js @@ -21,11 +21,14 @@ const SystemStore = { system.sysAttentionLed = data.Oem?.IBM?.PartitionSystemAttentionIndicator || data.Oem?.IBM?.PlatformSystemAttentionIndicator; + system.issysAttentionLed = system.sysAttentionLed; system.locationIndicatorActive = data.LocationIndicatorActive; + system.issysidentifyLed = data.LocationIndicatorActive; system.model = data.Model; system.processorSummaryCoreCount = data.ProcessorSummary?.CoreCount; system.processorSummaryCount = data.ProcessorSummary?.Count; system.powerState = data.PowerState; + system.powerLedStatus = data.PowerState; system.serialNumber = data.SerialNumber; system.statusState = data.Status?.State; state.systems = [system]; @@ -67,6 +70,32 @@ const SystemStore = { } }); }, + async PowerStatusLedState({ commit }, ledState) { + return await api + .patch('/redfish/v1/Systems/system', { + powerLedStatus: ledState, + }) + .then(() => { + if (ledState) { + return i18n.t('pageInventory.toast.successEnableIdentifyLed'); + } else { + return i18n.t('pageInventory.toast.successDisableIdentifyLed'); + } + }) + .catch((error) => { + commit('setSystemInfo', this.state.system.systems[0]); + console.log('error', error); + if (ledState) { + throw new Error( + i18n.t('pageInventory.toast.errorEnableIdentifyLed') + ); + } else { + throw new Error( + i18n.t('pageInventory.toast.errorDisableIdentifyLed') + ); + } + }); + }, async changeSystemAttentionLedState({ commit }, ledState) { return await api .patch('/redfish/v1/Systems/system', { diff --git a/src/views/HardwareStatus/Inventory/InventoryFabricAdapters.vue b/src/views/HardwareStatus/Inventory/InventoryFabricAdapters.vue index 551effcd79..bd55174104 100644 --- a/src/views/HardwareStatus/Inventory/InventoryFabricAdapters.vue +++ b/src/views/HardwareStatus/Inventory/InventoryFabricAdapters.vue @@ -91,6 +91,18 @@
--
+ + +