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 @@
+ - - {{ $t('pageFirmware.form.updateFirmware.workstation') }} - - - {{ $t('pageFirmware.form.updateFirmware.tftpServer') }} - - - - - - - - - - + + + import { ref, computed, watch, onBeforeMount } from 'vue'; import { useVuelidate } from '@vuelidate/core'; -import { requiredIf } from '@vuelidate/validators'; +import { required } from '@vuelidate/validators'; import i18n from '@/i18n'; import useLoadingBar, { loading, } from '@/components/Composables/useLoadingBarComposable'; import useToast from '@/components/Composables/useToastComposable'; import useVuelidateComposable from '@/components/Composables/useVuelidateComposable'; -import InfoTooltip from '@/components/Global/InfoTooltip.vue'; import IconInfo from '@carbon/icons-vue/es/information/16'; import FormFile from '@/components/Global/FormFile.vue'; import ModalUpdateFirmware from './FirmwareModalUpdateFirmware.vue'; @@ -116,13 +72,10 @@ defineProps({ }, }); -const isWorkstationSelected = ref(true); const file = ref(null); -const tftpFileAddress = ref(null); const isServerPowerOffRequired = ref( import.meta.env.VITE_APP_SERVER_OFF_REQUIRED === 'true', ); -const tftpServer = ref(import.meta.env.VITE_APP_TFTP_SERVER === 'true'); onBeforeMount(() => { bmcStore.getBmcInfo(); @@ -137,32 +90,14 @@ const bootProgress = computed(() => { return globalStore.bootProgressGetter; }); -const isTftpUploadAvailable = computed(() => { - return firmwareStore.isTftpUploadAvailable; -}); - const rules = computed(() => ({ file: { - requiredIf: requiredIf(function () { - return isWorkstationSelected.value; - }), - }, - tftpFileAddress: { - requiredIf: requiredIf(function () { - return !isWorkstationSelected.value; - }), + required: required, }, })); const v$ = useVuelidate(rules, { file, - tftpFileAddress, -}); - -watch(isWorkstationSelected, () => { - v$.value.$reset(); - file.value = null; - tftpFileAddress.value = null; }); watch(loading, (value) => { @@ -188,11 +123,7 @@ function updateFirmware() { }, ); } - if (isWorkstationSelected.value) { - dispatchWorkstationUpload(activateFirmware); - } else { - dispatchTftpUpload(activateFirmware); - } + dispatchWorkstationUpload(activateFirmware); }; // Step 2 - Activation @@ -317,18 +248,6 @@ function dispatchWorkstationUpload(activateFirmware) { }); } -function dispatchTftpUpload(activateFirmware) { - firmwareStore - .uploadFirmwareTFTP(tftpFileAddress.value) - .then(({ data }) => { - activateFirmware(data); - }) - .catch(({ message }) => { - endLoader(); - errorToast(message); - }); -} - function onSubmitUpload() { v$.value.$touch(); if (v$.value.$invalid) return; diff --git a/src/views/Operations/ServerPowerOperations/BiosSettings.vue b/src/views/Operations/ServerPowerOperations/BiosSettings.vue index a5daf62ee3..0e7f16262d 100644 --- a/src/views/Operations/ServerPowerOperations/BiosSettings.vue +++ b/src/views/Operations/ServerPowerOperations/BiosSettings.vue @@ -160,6 +160,7 @@ }, ) }} + {{ powerPolicy + 'qqwwwwwwwwwww' }}
@@ -363,6 +364,20 @@ + + {{ $t('global.action.save') }} + @@ -783,6 +798,11 @@ const ibmiConsoleItems = ref([ }, ]); +const form = ref({ + attributes: bootSettingsStore.getBiosAttributes, + attributeValues: bootSettingsStore.getAttributeValues, +}); + onBeforeMount(() => { bootSettingsStore.fetchLocationCodes(); setTimeout(() => { diff --git a/src/views/Operations/ServerPowerOperations/BootSettings.vue b/src/views/Operations/ServerPowerOperations/BootSettings.vue index 6016fbfc31..4e077acdbb 100644 --- a/src/views/Operations/ServerPowerOperations/BootSettings.vue +++ b/src/views/Operations/ServerPowerOperations/BootSettings.vue @@ -9,20 +9,6 @@ @is-linux-kvm-valid="linuxKvmValue" @updated-attributes="updateAttributeKeys" /> - - {{ $t('global.action.save') }} - diff --git a/src/views/ResourceManagement/SystemParameters/RuntimeProcessorDiagnostic.vue b/src/views/ResourceManagement/SystemParameters/RuntimeProcessorDiagnostic.vue index 84493fdbdd..27fe09e19a 100644 --- a/src/views/ResourceManagement/SystemParameters/RuntimeProcessorDiagnostic.vue +++ b/src/views/ResourceManagement/SystemParameters/RuntimeProcessorDiagnostic.vue @@ -341,7 +341,9 @@ const updateImmediateTestRequestedState = (value) => { systemParametersStore.saveImmediateTestRequested({ value: value ? 'Enabled' : 'Disabled', }), - systemParametersStore.getRpdScheduledRun, + setTimeout(() => { + systemParametersStore.getBiosAttributesRegistry; + }, 5000), ]) .then((message) => { if (value && isServerOff.value) { diff --git a/src/views/ResourceManagement/SystemParameters/SystemParameters.vue b/src/views/ResourceManagement/SystemParameters/SystemParameters.vue index 1022f65f21..65e083166f 100644 --- a/src/views/ResourceManagement/SystemParameters/SystemParameters.vue +++ b/src/views/ResourceManagement/SystemParameters/SystemParameters.vue @@ -29,19 +29,7 @@ const global = stores.GlobalStore(); onBeforeMount(() => { startLoader(); - Promise.all([ - systemParametersStore.getLateralCastOutMode(), - systemParametersStore.getAggressivePrefetch(), - systemParametersStore.getImmediateTestRequested(), - systemParametersStore.getGuardOnError(), - systemParametersStore.getRpdPolicyOptions(), - systemParametersStore.getRpdFeatureOptions(), - systemParametersStore.getRpdPolicy(), - systemParametersStore.getRpdPolicyCurrent(), - systemParametersStore.getRpdFeature(), - systemParametersStore.getRpdScheduledRun(), - systemParametersStore.getRpdScheduledRunDuration(), - ]).finally(() => endLoader()); + systemParametersStore.getBiosAttributesRegistry().finally(() => endLoader()); }); const serverStatus = computed(() => { diff --git a/src/views/Settings/Network/ModalIpv6StaticDefaultGateway.vue b/src/views/Settings/Network/ModalIpv6StaticDefaultGateway.vue index d6d61bcc03..e2cb693a00 100644 --- a/src/views/Settings/Network/ModalIpv6StaticDefaultGateway.vue +++ b/src/views/Settings/Network/ModalIpv6StaticDefaultGateway.vue @@ -13,7 +13,7 @@ > - + - - - - - - - - - @@ -76,7 +44,7 @@ import { ref, computed, watch } from 'vue'; import useVuelidateComposable from '@/components/Composables/useVuelidateComposable'; import { useVuelidate } from '@vuelidate/core'; -import { required, minValue, maxValue, helpers } from '@vuelidate/validators'; +import { required, helpers } from '@vuelidate/validators'; import eventBus from '@/eventBus'; const { getValidationState } = useVuelidateComposable(); @@ -89,10 +57,6 @@ eventBus.on('modal-add-ipv6-default-gateway', () => { }); const props = defineProps({ - prefixLength: { - type: Number, - default: 0, - }, ipAddress: { type: String, default: '', @@ -105,7 +69,6 @@ const props = defineProps({ const form = ref({ ipAddress: '', - prefixLength: 0, }); const rules = computed(() => ({ @@ -116,11 +79,6 @@ const rules = computed(() => ({ /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))|(^\s*((?=.{1,255}$)(?=.*[A-Za-z].*)[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?)*)\s*$)/, ), }, - prefixLength: { - required, - minValue: minValue(0), - maxValue: maxValue(128), - }, }, })); @@ -135,19 +93,11 @@ watch( }, ); -watch( - () => props.prefixLength, - () => { - form.value.prefixLength = props.prefixLength; - }, -); - const handleSubmit = () => { v$.value.$touch(); if (v$.value.$invalid) return; emit('ok', { Address: form.value.ipAddress, - PrefixLength: Number(form.value.prefixLength), }); closeModal(); }; diff --git a/src/views/Settings/Network/Network.vue b/src/views/Settings/Network/Network.vue index a8f86aca07..1b187f1a14 100644 --- a/src/views/Settings/Network/Network.vue +++ b/src/views/Settings/Network/Network.vue @@ -56,7 +56,6 @@ @ok="saveIpv6Address" /> { ipAddress.value = item.Address; ipAddressIpv6StaticDefaultGateway.value = item.Address; prefixLength.value = item.PrefixLength; - prefixLengthIpv6StaticDefaultGateway.value = item.PrefixLength; }); networkStore.setSelectedTabIndex(0); }); @@ -224,7 +221,6 @@ const saveIpv6StaticDefaultGatewayAddress = (modalFormData) => { //Edit selected row const selectedRow = { Address: ipAddressIpv6StaticDefaultGateway.value, - PrefixLength: 0, }; const editRow = modalData.concat(selectedRow); networkStore diff --git a/src/views/Settings/Network/TableIpv6StaticDefaultGateway.vue b/src/views/Settings/Network/TableIpv6StaticDefaultGateway.vue index 98ce09f5fe..fd6a96fb79 100644 --- a/src/views/Settings/Network/TableIpv6StaticDefaultGateway.vue +++ b/src/views/Settings/Network/TableIpv6StaticDefaultGateway.vue @@ -2,52 +2,49 @@
- - +
+ + + {{ $t('pageNetwork.table.addIpv6StaticDefaultGateway') }} + +
+ - - {{ $t('pageNetwork.table.addIpv6StaticDefaultGateway') }} -
+ +
- - - +
{ form.value.ipv6DefaultGatewayTableItems = addresses.map((ipv6) => { return { Address: ipv6.Address, - PrefixLength: ipv6.PrefixLength, actions: [ { value: 'edit', @@ -201,10 +193,9 @@ const openDeleteIpv6DefaultGatewayTableRowModal = (item) => { const newIpv6Array = form.value.ipv6DefaultGatewayTableItems .filter((row) => row.Address !== item.Address) .map((ipv6) => { - const { Address, PrefixLength } = ipv6; + const { Address } = ipv6; return { Address, - PrefixLength, }; }); const addressIp = item.Address; diff --git a/src/views/Settings/SnmpAlerts/SnmpAlerts.vue b/src/views/Settings/SnmpAlerts/SnmpAlerts.vue index 7e66e4278d..9bf3a933ce 100644 --- a/src/views/Settings/SnmpAlerts/SnmpAlerts.vue +++ b/src/views/Settings/SnmpAlerts/SnmpAlerts.vue @@ -229,7 +229,6 @@ const onModalOk = ({ ipAddress, port }) => { const data = { Destination: destination, SubscriptionType: 'SNMPTrap', - DeliveryRetryPolicy: 'TerminateAfterRetries', Protocol: 'SNMPv2c', }; startLoader();