diff --git a/.env.ibm b/.env.ibm index cc91ed0d47..32db72b9b0 100644 --- a/.env.ibm +++ b/.env.ibm @@ -7,5 +7,4 @@ VITE_CUSTOM_APP_NAV=true VITE_CUSTOM_ROUTER=true VITE_CUSTOM_STORE=true VITE_APP_SERVER_OFF_REQUIRED=true -VITE_APP_TFTP_SERVER=false VITE_APP_ACF_UPLOAD_REQUIRED=true diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js index 7c57d21f37..6afc96ccbd 100644 --- a/src/store/modules/GlobalStore.js +++ b/src/store/modules/GlobalStore.js @@ -147,6 +147,26 @@ export const GlobalStore = defineStore('global', { }) .catch((error) => console.log(error)); }, + async getSafeMode() { + return api + .get('/redfish/v1/Systems/system/Processors?$expand=.($levels=2)') + .then(({ data }) => { + this.safeMode = false; + for (let member of data.Members) { + if ( + member?.Throttled && + member?.ThrottleCauses.includes('ManagementDetectedFault') + ) { + this.safeMode = true; + break; + } + } + }) + .catch((error) => { + console.log(error); + return Promise.reject(error); + }); + }, async getSystemInfo() { return await api .get('/redfish/v1/Systems/system') @@ -157,9 +177,6 @@ export const GlobalStore = defineStore('global', { Model, PowerState, SerialNumber, - Oem: { - IBM: { SafeMode }, - }, Status: { State } = {}, }, } = {}) => { @@ -167,7 +184,6 @@ export const GlobalStore = defineStore('global', { this.serialNumber = SerialNumber; this.modelType = Model; localStorage.setItem('storedModelType', Model); - this.safeMode = SafeMode; if (State === 'Quiesced' || State === 'InTest') { // OpenBMC's host state interface is mapped to 2 Redfish // properties "Status""State" and "PowerState". Look first @@ -177,6 +193,7 @@ export const GlobalStore = defineStore('global', { } else { this.serverStatus = serverStateMapper(PowerState); } + this.getSafeMode(); return Promise.resolve(); }, ) diff --git a/src/store/modules/HardwareStatus/ChassisStore.js b/src/store/modules/HardwareStatus/ChassisStore.js index 8f1e793419..e84b1986a0 100644 --- a/src/store/modules/HardwareStatus/ChassisStore.js +++ b/src/store/modules/HardwareStatus/ChassisStore.js @@ -20,7 +20,7 @@ export const ChassisStore = defineStore('chassisStore', { LocationIndicatorActive, Name, Location, - Oem, + Version, } = chassis; return { @@ -31,7 +31,7 @@ export const ChassisStore = defineStore('chassisStore', { identifyLed: LocationIndicatorActive, uri: chassis['@odata.id'], locationNumber: Location?.PartLocation?.ServiceLabel, - firmwareVersion: Oem?.OpenBMC?.FirmwareVersion, + firmwareVersion: Version, }; }); }, diff --git a/src/store/modules/HardwareStatus/PcieTopologyStore.js b/src/store/modules/HardwareStatus/PcieTopologyStore.js index 933c0a0c16..68a84a7a90 100644 --- a/src/store/modules/HardwareStatus/PcieTopologyStore.js +++ b/src/store/modules/HardwareStatus/PcieTopologyStore.js @@ -779,7 +779,7 @@ export const PcieTopologyStore = defineStore('pcieTopologyStore', { if (slot?.pcieDevice) { row.linkSpeed = slot?.pcieDevice?.PCIeInterface?.PCIeType; row.linkWidth = - slot?.pcieDevice?.PCIeInterface?.LanesInUse === -1 + slot?.pcieDevice?.PCIeInterface?.LanesInUse === null ? 'unknown' : slot?.pcieDevice?.PCIeInterface?.LanesInUse; if ( diff --git a/src/store/modules/Logs/DumpsStore.js b/src/store/modules/Logs/DumpsStore.js index e54688e8b6..53dfb99b8c 100644 --- a/src/store/modules/Logs/DumpsStore.js +++ b/src/store/modules/Logs/DumpsStore.js @@ -44,7 +44,22 @@ export const DumpsStore = defineStore('dumps', { this.allDumps = allDumps.map((dump) => ({ data: dump.AdditionalDataURI, dateTime: new Date(dump.Created), - dumpType: dump.Name, + dumpType: + dump.Name === 'System Dump Entry' + ? dump.Id.startsWith('0') + ? 'Hardware Dump Entry' + : dump.Id.startsWith('2') + ? 'Hostboot Dump Entry' + : dump.Id.startsWith('3') + ? 'SBE Dump Entry' + : dump.Id.startsWith('4') + ? 'OCMB SBE Dump Entry' + : dump.Id.startsWith('A') + ? 'System Dump Entry' + : dump.Id.startsWith('B') + ? 'Resource Dump Entry' + : dump.Name + : dump.Name, id: dump.Id, location: dump['@odata.id'], size: dump.AdditionalDataSizeBytes, diff --git a/src/store/modules/Logs/IBMiServiceFunctionsStore.js b/src/store/modules/Logs/IBMiServiceFunctionsStore.js index 7126d2b689..f38603cc3b 100644 --- a/src/store/modules/Logs/IBMiServiceFunctionsStore.js +++ b/src/store/modules/Logs/IBMiServiceFunctionsStore.js @@ -21,7 +21,7 @@ export const IBMiServiceFunctionsStore = defineStore('ibmiServiceFunctions', { async executeServiceFunction(value) { return await api .post( - '/redfish/v1/Systems/system/Actions/Oem/OemComputerSystem.ExecutePanelFunction', + '/redfish/v1/Systems/system/Actions/Oem/IBM/IBMComputerSystem.ExecutePanelFunction', { FuncNo: value, }, diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js index 941e896b6a..13dc1c175b 100644 --- a/src/store/modules/Operations/FirmwareStore.js +++ b/src/store/modules/Operations/FirmwareStore.js @@ -9,13 +9,11 @@ export const FirmwareStore = defineStore('firmware', { bmcActiveFirmwareId: null, hostActiveFirmwareId: null, applyTime: null, - tftpAvailable: false, firmwareBootSide: null, lowestSupportedFirmwareVersion: '', showAlert: false, }), getters: { - isTftpUploadAvailable: (state) => state.tftpAvailable, isSingleFileUploadEnabled: (state) => state.hostFirmware.length === 0, activeBmcFirmware: (state) => { return state.bmcFirmware.find( @@ -133,14 +131,7 @@ export const FirmwareStore = defineStore('firmware', { .then(({ data }) => { const applyTime = data.HttpPushUriOptions.HttpPushUriApplyTime.ApplyTime; - const allowableActions = - data?.Actions?.['#UpdateService.SimpleUpdate']?.[ - 'TransferProtocol@Redfish.AllowableValues' - ]; this.applyTime = applyTime; - if (allowableActions?.includes('TFTP')) { - this.tftpAvailable = true; - } }) .catch((error) => console.log(error)); }, @@ -169,7 +160,7 @@ export const FirmwareStore = defineStore('firmware', { await this.setApplyTimeImmediate(); } return await api - .post('/redfish/v1/UpdateService', image, { + .post('/redfish/v1/UpdateService/update', image, { headers: { 'Content-Type': 'application/octet-stream' }, }) .catch((error) => { @@ -179,28 +170,6 @@ export const FirmwareStore = defineStore('firmware', { ); }); }, - async uploadFirmwareTFTP(fileAddress) { - const data = { - TransferProtocol: 'TFTP', - ImageURI: fileAddress, - }; - if (this.applyTime !== 'Immediate') { - // ApplyTime must be set to Immediate before making - // request to update firmware - await this.setApplyTimeImmediate(); - } - return await api - .post( - '/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate', - data, - ) - .catch((error) => { - console.log(error); - throw new Error( - i18n.global.t('pageFirmware.toast.errorUpdateFirmware'), - ); - }); - }, async switchBmcFirmwareAndReboot() { const backupLocation = this.backupBmcFirmware.location; const data = { diff --git a/src/store/modules/ResourceManagement/ResourceMemoryStore.js b/src/store/modules/ResourceManagement/ResourceMemoryStore.js index ad3bf8a5b1..06bc87ca7c 100644 --- a/src/store/modules/ResourceManagement/ResourceMemoryStore.js +++ b/src/store/modules/ResourceManagement/ResourceMemoryStore.js @@ -104,7 +104,7 @@ export const ResourceMemoryStore = defineStore('resourceMemory', { ); if (dynamicIoDrawerDefaultCapacity.length > 0) { let dynamicIoDrawerAttachmentDefaultCapacity = - dynamicIoDrawerDefaultCapacity[0].DefaultValue; + dynamicIoDrawerDefaultCapacity[0].UpperBound; this.dynamicIoDrawerDefaultCapacity = dynamicIoDrawerAttachmentDefaultCapacity; } diff --git a/src/store/modules/ResourceManagement/SystemParametersStore.js b/src/store/modules/ResourceManagement/SystemParametersStore.js index bd81ca979b..d11448e6b6 100644 --- a/src/store/modules/ResourceManagement/SystemParametersStore.js +++ b/src/store/modules/ResourceManagement/SystemParametersStore.js @@ -5,6 +5,7 @@ import { defineStore } from 'pinia'; export const SystemParametersStore = defineStore('systemParameters', { state: () => ({ state: { + registryEntries: [], rpdPolicyOptions: [], rpdFeatureOptions: [], aggressivePrefetch: false, @@ -22,6 +23,7 @@ export const SystemParametersStore = defineStore('systemParameters', { }, }), getters: { + registryEntriesGetter: (state) => state.registryEntries, aggressivePrefetchGetter: (state) => state.aggressivePrefetch, frequencyMaxGetter: (state) => state.frequencyCap?.frequencyMax, frequencyMinGetter: (state) => state.frequencyCap?.frequencyMin, @@ -43,138 +45,67 @@ export const SystemParametersStore = defineStore('systemParameters', { rpdScheduledRunDurationGetter: (state) => state.rpdScheduledRunDuration, }, actions: { - async getAggressivePrefetch() { + async getBiosAttributesRegistry() { return await api .get( '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', ) - .then(({ data: { RegistryEntries } }) => { - const aggressivePrefetch = RegistryEntries.Attributes.filter( + .then((response) => { + this.registryEntries = response.data['RegistryEntries']; + const aggressivePrefetch = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'hb_proc_favor_aggressive_prefetch', ); let aggressivePrefetchValue = aggressivePrefetch[0].CurrentValue; - let modeValue = aggressivePrefetchValue == 'Enabled' ? true : false; - this.aggressivePrefetch = modeValue; - }) - .catch((error) => console.log(error)); - }, - async getRpdPolicy() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const rpdPolicy = RegistryEntries.Attributes.filter( + let aggressivePrefetchModeValue = + aggressivePrefetchValue == 'Enabled' ? true : false; + this.aggressivePrefetch = aggressivePrefetchModeValue; + const rpdPolicy = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'pvm_rpd_policy', ); let rpdPolicyValue = rpdPolicy[0].CurrentValue; this.rpdPolicy = rpdPolicyValue; this.pvmRpdPolicy = rpdPolicyValue; - }) - .catch((error) => console.log(error)); - }, - async getRpdPolicyCurrent() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const rpdPolicyCurr = RegistryEntries.Attributes.filter( + const rpdPolicyCurr = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'pvm_rpd_feature_current', ); let rpdPolicyCurrValue = rpdPolicyCurr[0].CurrentValue; this.rpdPolicyCurrent = rpdPolicyCurrValue; - }) - .catch((error) => console.log(error)); - }, - async getRpdFeature() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const rpdFeature = RegistryEntries.Attributes.filter( + const rpdFeature = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'pvm_rpd_feature', ); let rpdFeatureValue = rpdFeature[0].CurrentValue; this.rpdFeature = rpdFeatureValue; - }) - .catch((error) => console.log(error)); - }, - async getImmediateTestRequested() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const immediateTestRequested = RegistryEntries.Attributes.filter( + const immediateTestRequested = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'pvm_rpd_immediate_test', ); let immediateTestRequestedValue = immediateTestRequested[0].CurrentValue; - let modeValue = + let immediateTestRequestedModeValue = immediateTestRequestedValue == 'Enabled' ? true : false; - this.immediateTestRequested = modeValue; - }) - .catch((error) => console.log(error)); - }, - async getGuardOnError() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const immediateTestRequested = RegistryEntries.Attributes.filter( + this.immediateTestRequested = immediateTestRequestedModeValue; + const guardOnError = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'pvm_rpd_guard_policy', ); - let immediateTestRequestedValue = - immediateTestRequested[0].CurrentValue; - let modeValue = - immediateTestRequestedValue == 'Enabled' ? true : false; - this.guardOnError = modeValue; - }) - .catch((error) => console.log(error)); - }, - async getRpdPolicyOptions() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const rpdPolicy = RegistryEntries.Attributes.filter( + let guardOnErrorCurr = guardOnError[0].CurrentValue; + let guardOnErrorModeValue = + guardOnErrorCurr == 'Enabled' ? true : false; + this.guardOnError = guardOnErrorModeValue; + const rpdPolicyOps = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'pvm_rpd_policy', ); - let rpdPolicyOptions = rpdPolicy[0].Value.map( + let rpdPolicyOptions = rpdPolicyOps[0].Value.map( ({ ValueName }) => ValueName, ); this.rpdPolicyOptions = rpdPolicyOptions; - }) - .catch((error) => console.log(error)); - }, - async getRpdFeatureOptions() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const rpdPolicy = RegistryEntries.Attributes.filter( + const rpdFeatureOps = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'pvm_rpd_feature', ); - let rpdFeatureOptions = rpdPolicy[0].Value.map( + let rpdFeatureOptions = rpdFeatureOps[0].Value.map( ({ ValueName }) => ValueName, ); this.rpdFeatureOptions = rpdFeatureOptions; - }) - .catch((error) => console.log(error)); - }, - async getRpdScheduledRun() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const rpdScheduledRun = RegistryEntries.Attributes.filter( + const rpdScheduledRun = this.registryEntries.Attributes.filter( (Attribute) => Attribute.AttributeName == 'pvm_rpd_scheduled_tod', ); let RpdScheduledRunValue = rpdScheduledRun[0].CurrentValue; @@ -183,21 +114,21 @@ export const SystemParametersStore = defineStore('systemParameters', { const hourString = hours.toString().padStart(2, '0'); const minuteString = minutes.toString().padStart(2, '0'); this.rpdScheduledRun = `${hourString}:${minuteString}`; - }) - .catch((error) => console.log(error)); - }, - async getRpdScheduledRunDuration() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const rpdScheduledRunDuration = RegistryEntries.Attributes.filter( - (Attribute) => - Attribute.AttributeName == 'pvm_rpd_scheduled_duration', - ); + const rpdScheduledRunDuration = + this.registryEntries.Attributes.filter( + (Attribute) => + Attribute.AttributeName == 'pvm_rpd_scheduled_duration', + ); let rpdScheduledRunValue = rpdScheduledRunDuration[0].CurrentValue; this.rpdScheduledRunDuration = rpdScheduledRunValue; + const lateralCastOutMode = this.registryEntries.Attributes.filter( + (Attribute) => + Attribute.AttributeName == 'hb_lateral_cast_out_mode', + ); + let lateralCastOutModeValue = lateralCastOutMode[0].CurrentValue; + let lateralCastModeValue = + lateralCastOutModeValue == 'Enabled' ? true : false; + this.lateralCastOutMode = lateralCastModeValue; }) .catch((error) => console.log(error)); }, @@ -238,7 +169,7 @@ export const SystemParametersStore = defineStore('systemParameters', { ) .then(() => { this.rpdPolicy = updatedRpdPolicyValue.Attributes.pvm_rpd_policy; - this.getRpdPolicy(); + this.getBiosAttributesRegistry(); return i18n.global.t( 'pageSystemParameters.toast.successSavingRpdPolicy', ); @@ -366,22 +297,6 @@ export const SystemParametersStore = defineStore('systemParameters', { ); }); }, - async getLateralCastOutMode() { - return await api - .get( - '/redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry', - ) - .then(({ data: { RegistryEntries } }) => { - const lateralCastOutMode = RegistryEntries.Attributes.filter( - (Attribute) => - Attribute.AttributeName == 'hb_lateral_cast_out_mode', - ); - let lateralCastOutModeValue = lateralCastOutMode[0].CurrentValue; - let modeValue = lateralCastOutModeValue == 'Enabled' ? true : false; - this.lateralCastOutMode = modeValue; - }) - .catch((error) => console.log(error)); - }, async saveLateralCastOutMode(lateralCastOutModeValue) { let updatedModeValue = lateralCastOutModeValue ? 'Enabled' : 'Disabled'; this.lateralCastOutMode = lateralCastOutModeValue; diff --git a/src/store/modules/Settings/HardwareDeconfigurationStore.js b/src/store/modules/Settings/HardwareDeconfigurationStore.js index 55300a9282..126228427f 100644 --- a/src/store/modules/Settings/HardwareDeconfigurationStore.js +++ b/src/store/modules/Settings/HardwareDeconfigurationStore.js @@ -17,216 +17,182 @@ export const HardwareDeconfigurationStore = defineStore( actions: { async getProcessorsCollection() { return await api - .get('/redfish/v1/Systems/system/Processors') - .then(({ data: { Members } }) => - Members.map((member) => member['@odata.id']), - ) + .get('/redfish/v1/Systems/system/Processors?$expand=.($levels=2)') + .then(({ data: { Members } }) => Members) .catch((error) => console.log(error)); }, async getProcessors() { + let totalCores = []; const collection = await this.getProcessorsCollection(); if (!collection) return; - await api - .all(collection.map((processor) => this.getCores(processor))) - .then((response) => { - var totalCores = [].concat.apply([], response); + collection.map((processor) => + this.getCores(processor).then((response) => { + totalCores = [].concat.apply(totalCores, response); this.cores = totalCores; - }); + }), + ); }, - async getCores(id) { - const locationCode = await api - .get(`${id}`) - .then((response) => response.data.Location.PartLocation.ServiceLabel) - .catch((error) => console.log(error)); - const procId = await api - .get(`${id}`) - .then((response) => response.data.Id) - .catch((error) => console.log(error)); + async getCores(processor) { + const locationCode = processor.Location.PartLocation.ServiceLabel; + const procId = processor.Id; const cores = await api - .get(`${id}/SubProcessors`) - .then((response) => response.data.Members) - .catch((error) => console.log(error)); + .get(`${processor['@odata.id']}/SubProcessors?$expand=.($levels=2)`) + .then((response) => response.data.Members); if (!cores) return; - const promises = cores.map((core) => { - return api.get(core['@odata.id']).catch((error) => { - console.log(error); - return error; - }); - }); - return await api.all(promises).then( - api.spread((...responses) => { - const coreData = responses.map(({ data }) => { - var msgArgs = 'None'; - var eventId = ''; - const conditionsArray = data.Status?.Conditions; - if (Array.isArray(conditionsArray) && conditionsArray.length) { - const messageArgsArray = conditionsArray[0].MessageArgs; - if ( - Array.isArray(messageArgsArray) && - messageArgsArray.length - ) { - msgArgs = messageArgsArray[0]; - } - const logEntry = conditionsArray[0].LogEntry; - if (logEntry) { - const eventIdUrl = logEntry['@odata.id']; - const splitUrl = eventIdUrl.split('/'); - eventId = splitUrl[splitUrl.length - 1]; - } - } - return { - name: data.Name, - status: data.Status.Health, - id: data.Id, - location: locationCode, - functionalState: data.Status?.Health, - settings: data.Enabled, - uri: data['@odata.id'], - deconfigurationType: - msgArgs === 'By Association' + const coreData = cores.map((data) => { + var msgArgs = 'None'; + var eventId = ''; + const conditionsArray = data.Status?.Conditions; + if (Array.isArray(conditionsArray) && conditionsArray.length) { + const messageArgsArray = conditionsArray[0].MessageArgs; + if (Array.isArray(messageArgsArray) && messageArgsArray.length) { + msgArgs = messageArgsArray[0]; + } + const logEntry = conditionsArray[0].LogEntry; + if (logEntry) { + const eventIdUrl = logEntry['@odata.id']; + const splitUrl = eventIdUrl.split('/'); + eventId = splitUrl[splitUrl.length - 1]; + } + } + return { + name: data.Name, + status: data.Status.Health, + id: data.Id, + location: locationCode, + functionalState: data.Status?.Health, + settings: data.Enabled, + uri: data['@odata.id'], + deconfigurationType: + msgArgs === 'By Association' + ? i18n.global.t( + 'pageDeconfigurationHardware.table.filter.byAssociation', + ) + : msgArgs === 'Error' + ? i18n.global.t( + 'pageDeconfigurationHardware.table.filter.error', + ) + : msgArgs === 'Fatal' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.byAssociation', + 'pageDeconfigurationHardware.table.filter.fatal', ) - : msgArgs === 'Error' + : msgArgs === 'FCO-Deconfigured' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.error', + 'pageDeconfigurationHardware.table.filter.fcoDeconfigured', ) - : msgArgs === 'Fatal' + : msgArgs === 'Invalid' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.fatal', + 'pageDeconfigurationHardware.table.filter.invalid', ) - : msgArgs === 'FCO-Deconfigured' + : msgArgs === 'Manual' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.fcoDeconfigured', + 'pageDeconfigurationHardware.table.filter.manual', ) - : msgArgs === 'Invalid' + : msgArgs === 'None' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.invalid', + 'pageDeconfigurationHardware.table.filter.none', ) - : msgArgs === 'Manual' + : msgArgs === 'Predictive' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.manual', + 'pageDeconfigurationHardware.table.filter.predictive', ) - : msgArgs === 'None' + : msgArgs === 'Recovered' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.none', + 'pageDeconfigurationHardware.table.filter.recovered', ) - : msgArgs === 'Predictive' + : msgArgs === 'Unknown' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.predictive', + 'pageDeconfigurationHardware.table.filter.unknown', ) - : msgArgs === 'Recovered' - ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.recovered', - ) - : msgArgs === 'Unknown' - ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.unknown', - ) - : msgArgs, - processorId: procId, - eventID: eventId, - }; - }); - return coreData; - }), - ); + : msgArgs, + processorId: procId, + eventID: eventId, + }; + }); + return coreData; }, async getDimms() { const dimms = await api - .get('/redfish/v1/Systems/system/Memory') + .get('/redfish/v1/Systems/system/Memory?$expand=.($levels=2)') .then((response) => response.data.Members) .catch((error) => console.log(error)); if (!dimms) return; - const promises = dimms.map((dimm) => { - return api.get(dimm['@odata.id']).catch((error) => { - console.log(error); - return error; - }); - }); - return await api.all(promises).then( - api.spread((...responses) => { - const dimmsData = responses.map(({ data }) => { - var msgArgs = 'None'; - var eventId = ''; - const conditionsArray = data.Status?.Conditions; - if (Array.isArray(conditionsArray) && conditionsArray.length) { - const messageArgsArray = conditionsArray[0].MessageArgs; - if ( - Array.isArray(messageArgsArray) && - messageArgsArray.length - ) { - msgArgs = messageArgsArray[0]; - } - const logEntry = conditionsArray[0].LogEntry; - if (logEntry) { - const eventIdUrl = logEntry['@odata.id']; - const splitUrl = eventIdUrl.split('/'); - eventId = splitUrl[splitUrl.length - 1]; - } - } - return { - id: data.Id, - name: data.Name, - functionalState: data.Status?.Health, - size: data.CapacityMiB, - locationCode: data.Location?.PartLocation?.ServiceLabel, - deconfigurationType: - msgArgs === 'By Association' + const dimmsData = dimms.map((data) => { + var msgArgs = 'None'; + var eventId = ''; + const conditionsArray = data.Status?.Conditions; + if (Array.isArray(conditionsArray) && conditionsArray.length) { + const messageArgsArray = conditionsArray[0].MessageArgs; + if (Array.isArray(messageArgsArray) && messageArgsArray.length) { + msgArgs = messageArgsArray[0]; + } + const logEntry = conditionsArray[0].LogEntry; + if (logEntry) { + const eventIdUrl = logEntry['@odata.id']; + const splitUrl = eventIdUrl.split('/'); + eventId = splitUrl[splitUrl.length - 1]; + } + } + return { + id: data.Id, + name: data.Name, + functionalState: data.Status?.Health, + size: data.CapacityMiB, + locationCode: data.Location?.PartLocation?.ServiceLabel, + deconfigurationType: + msgArgs === 'By Association' + ? i18n.global.t( + 'pageDeconfigurationHardware.table.filter.byAssociation', + ) + : msgArgs === 'Error' + ? i18n.global.t( + 'pageDeconfigurationHardware.table.filter.error', + ) + : msgArgs === 'Fatal' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.byAssociation', + 'pageDeconfigurationHardware.table.filter.fatal', ) - : msgArgs === 'Error' + : msgArgs === 'FCO-Deconfigured' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.error', + 'pageDeconfigurationHardware.table.filter.fcoDeconfigured', ) - : msgArgs === 'Fatal' + : msgArgs === 'Invalid' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.fatal', + 'pageDeconfigurationHardware.table.filter.invalid', ) - : msgArgs === 'FCO-Deconfigured' + : msgArgs === 'Manual' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.fcoDeconfigured', + 'pageDeconfigurationHardware.table.filter.manual', ) - : msgArgs === 'Invalid' + : msgArgs === 'None' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.invalid', + 'pageDeconfigurationHardware.table.filter.none', ) - : msgArgs === 'Manual' + : msgArgs === 'Predictive' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.manual', + 'pageDeconfigurationHardware.table.filter.predictive', ) - : msgArgs === 'None' + : msgArgs === 'Recovered' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.none', + 'pageDeconfigurationHardware.table.filter.recovered', ) - : msgArgs === 'Predictive' + : msgArgs === 'Unknown' ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.predictive', + 'pageDeconfigurationHardware.table.filter.unknown', ) - : msgArgs === 'Recovered' - ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.recovered', - ) - : msgArgs === 'Unknown' - ? i18n.global.t( - 'pageDeconfigurationHardware.table.filter.unknown', - ) - : msgArgs, - settings: data.Enabled, - uri: data['@odata.id'], - available: data.Status?.State, - eventID: eventId, - }; - }); - const dimmsDataFiltered = dimmsData.filter( - (item) => item.available !== 'Absent', - ); - this.dimms = dimmsDataFiltered; - }), + : msgArgs, + settings: data.Enabled, + uri: data['@odata.id'], + available: data.Status?.State, + eventID: eventId, + }; + }); + const dimmsDataFiltered = dimmsData.filter( + (item) => item.available !== 'Absent', ); + this.dimms = dimmsDataFiltered; }, async updateSettingsState(settingsState) { const uri = settingsState.uri; diff --git a/src/store/modules/Settings/NetworkStore.js b/src/store/modules/Settings/NetworkStore.js index 80946e108d..d399d9dfb6 100644 --- a/src/store/modules/Settings/NetworkStore.js +++ b/src/store/modules/Settings/NetworkStore.js @@ -429,9 +429,9 @@ export const NetworkStore = defineStore('network', { return {}; // if address doesn't match then skip address, no change } }); - const filteredAddress = newIpv6StaticDefaultGatewayAddress.filter( - (item) => item.PrefixLength !== 0, - ); + let filteredAddress = []; + const newAddress = newIpv6StaticDefaultGatewayAddress[0]; + filteredAddress.push(newAddress); const updatedIpv6Array = { IPv6StaticDefaultGateways: [...updatedIpv6, ...filteredAddress], }; diff --git a/src/store/modules/Settings/PowerPolicyStore.js b/src/store/modules/Settings/PowerPolicyStore.js index 5693477185..6e3de243c7 100644 --- a/src/store/modules/Settings/PowerPolicyStore.js +++ b/src/store/modules/Settings/PowerPolicyStore.js @@ -14,27 +14,36 @@ export const PowerPolicyStore = defineStore('powerPolicy', { actions: { async getPowerRestorePolicies() { return await api - .get('/redfish/v1/JsonSchemas/ComputerSystem/ComputerSystem.json') - .then( - ({ - data: { - definitions: { PowerRestorePolicyTypes = {} }, - }, - }) => { - let powerPoliciesData = PowerRestorePolicyTypes.enum.map( - (powerState) => { - let desc = `${i18n.global.t( - `pagePowerRestorePolicy.policies.${powerState}`, - )} - ${PowerRestorePolicyTypes.enumDescriptions[powerState]}`; - return { - state: powerState, - desc, - }; + .get('/redfish/v1/JsonSchemas/ComputerSystem') + .then(async (response) => { + if ( + response.data?.Location.length > 0 && + response.data?.Location[0].Uri + ) { + return await api.get(response.data?.Location[0].Uri).then( + ({ + data: { + definitions: { PowerRestorePolicyTypes = {} }, + }, + }) => { + let powerPoliciesData = PowerRestorePolicyTypes.enum.map( + (powerState) => { + let desc = `${i18n.global.t( + `pagePowerRestorePolicy.policies.${powerState}`, + )} - ${ + PowerRestorePolicyTypes.enumDescriptions[powerState] + }`; + return { + state: powerState, + desc, + }; + }, + ); + this.powerRestorePolicies = powerPoliciesData; }, ); - this.powerRestorePolicies = powerPoliciesData; - }, - ); + } + }); }, async getPowerRestoreCurrentPolicy() { return await api diff --git a/src/views/Logs/Dumps/Dumps.vue b/src/views/Logs/Dumps/Dumps.vue index 795bc3852e..1a0183726f 100644 --- a/src/views/Logs/Dumps/Dumps.vue +++ b/src/views/Logs/Dumps/Dumps.vue @@ -256,6 +256,7 @@ const tableFilters = ref([ 'Hardware Dump Entry', 'Hostboot Dump Entry', 'SBE Dump Entry', + 'OCMB SBE Dump Entry', 'Resource Dump Entry', 'System Dump Entry', ], diff --git a/src/views/Logs/EventLogs/EventLogs.vue b/src/views/Logs/EventLogs/EventLogs.vue index c110fbe77c..ff721781fc 100644 --- a/src/views/Logs/EventLogs/EventLogs.vue +++ b/src/views/Logs/EventLogs/EventLogs.vue @@ -599,7 +599,7 @@ export default { ); } useLoadingBar().endLoader(); - }, 5000); + }, 8000); }) .catch( ({ message }) => this.toast.errorToast(message), @@ -644,7 +644,7 @@ export default { ); } useLoadingBar().endLoader(); - }, 5000); + }, 8000); }) .catch( ({ message }) => this.toast.errorToast(message), diff --git a/src/views/Operations/Firmware/FirmwareFormUpdate.vue b/src/views/Operations/Firmware/FirmwareFormUpdate.vue index bdd8650234..0c595a86a3 100644 --- a/src/views/Operations/Firmware/FirmwareFormUpdate.vue +++ b/src/views/Operations/Firmware/FirmwareFormUpdate.vue @@ -2,69 +2,26 @@