diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 37c33bb4c0..9df9e73aeb 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -458,6 +458,7 @@ "locationCode": "Location Code", "name": "Name", "pelId": "Pel ID", + "eventId": "Event ID", "settings": "Settings", "size": "Size in mebibytes" } @@ -497,6 +498,7 @@ "id": "Id", "name": "Name", "pelId": "Pel Id", + "eventId": "Event ID", "reference": "Reference", "resource": "Resource", "severity": "Severity", @@ -919,10 +921,6 @@ "pageSystemParameters": { "aggressivePrefetch": "Aggressive prefetch", "aggressivePrefetchDescription": "Only change this value if instructed by service provider as it might degrade system performance. Specifies if processor favor aggressive prefetch is disabled or enabled", - "alert": { - "message": "System has to be powered off. Changes made will take effect on next reboot", - "title": "Applying changes" - }, "button": { "saveSettings": "Save settings" }, @@ -931,12 +929,14 @@ "frequencyCapHelpText": "If disabled, might require an initial boot to get the max and min frequency to be able to set.", "lateralCastOut": "Lateral cast out", "lateralCastOutDescription": "Only change this value if instructed by your service provider as it might degrade system performance.", + "parametersInfo": "System has to be powered off. Changes made will take effect on next reboot.", "rpdPolicy": "Runtime processor diagnostic policy", "updateRpdPolicy": "Update RPD policy", "rpdPolicyDescription": "Enabled (Run on each core to test them on periodic basis), Scheduled (Run sequentially on each core at the scheduled time each day for the specified duration (in minutes)), Disabled (No diagnostics or exercisers will be run).", "rpdFeature": "Runtime processor diagnostic feature", "updateRpdFeature": "Update RPD feature", "rpdFeatureDescription": "Controls whether or not the Runtime Processor Diagnostics (RPD) Feature will be configured on the system. Enabled ( The RPD feature will be configured regardless of the amount of installed memory), Automatic (The RPD feature will be configured on systems with at least 128GB of installed memory and not configured on systems with less than 128GB), Disabled (The RPD feature will not be configured).", + "rpdFeatureInfo": "Changes made to RPD feature requires a reboot to take effect but all other RPD parameters can be set dynamically at runtime.", "startTime": "Start time (24-hour time (UTC))", "runNow": "Run now", "duration": "Duration (minutes)", @@ -1094,6 +1094,7 @@ "ipv6": "IPv6", "ipv6AutoConfig": "IPv6 auto config", "ipv6DefaultGateway": "IPv6 default gateway", + "ipv6StaticDefaultGateway": "IPv6 static default gateways", "macAddress": "MAC address", "network": "network", "networkSettings": "Network settings", @@ -1123,14 +1124,17 @@ "addDnsAddress": "Add IP address", "addIpv4Address": "Add static IPv4 address", "addIpv6Address": "Add static IPv6 address", + "addIpv6StaticDefaultGateway": "Add IPv6 static default gateway address", "addressOrigin": "Address origin", "addressState": "Address state", "deleteDns": "Delete DNS address", "deleteIpv4": "Delete IPv4 address", "deleteIpv6": "Delete IPv6 address", + "deleteIpv6StaticDefaultGateway": "Delete IPv6 static default gateway address", "editDns": "Edit DNS address", "editIpv4": "Edit static IPv4 address", "editIpv6": "Edit static IPv6 address", + "editIpv6StaticDefaultGateway": "Edit IPv6 static default gateway address", "gateway": "Gateway", "ipAddress": "IP address", "prefixLength": "Prefix length", @@ -1142,11 +1146,13 @@ "errorDeletingDnsServer": "Error deleting DNS server.", "errorDeletingIpv4Server": "Error deleting IPv4 server.", "errorDeletingIpv6Server": "Error deleting IPv6 server.", + "errorDeletingIpv6StaticDefaultGateway": "Error deleting IPv6 static default gateway.", "successSaveNetworkSettings": "Successfully updated %{setting} settings.", "successAddingDnsServer": "Successfully added DNS server.", "successDeletingDnsServer": "Successfully deleted DNS server.", "successDeletingIpv4Server": "Successfully deleted IPv4 server.", - "successDeletingIpv6Server": "Successfully deleted IPv6 server." + "successDeletingIpv6Server": "Successfully deleted IPv6 server.", + "successDeletingIpv6StaticDefaultGateway": "Successfully deleted IPv6 static default gateway." } }, "pageOverview": { @@ -1482,6 +1488,7 @@ "pvm_system_operating_mode": "Server operating mode", "pvm_system_power_off_policy": "Server power policy", "selectedOperatingModeManual": "On save operating mode will be set to Manual", + "selectedOperatingModeNormal": "On save operating mode will be set to Normal", "serverFirmware": "Server firmware start policy", "powerSettingDescription": "View power setting descriptions", "stayOn": "Stay On", diff --git a/src/store/modules/HardwareStatus/PcieTopologyStore.js b/src/store/modules/HardwareStatus/PcieTopologyStore.js index 4de126cb8a..f5916d3bae 100644 --- a/src/store/modules/HardwareStatus/PcieTopologyStore.js +++ b/src/store/modules/HardwareStatus/PcieTopologyStore.js @@ -247,7 +247,7 @@ const PcieTopologyStore = { } if ( chassisMembers[index].PCIeSlots.Slots[j].Links?.Oem?.IBM - ?.AssociatedAssembly.length > 0 + ?.AssociatedAssembly ) { let isAssemblySet = false; if (chassisInfo.length > 0) { @@ -261,10 +261,12 @@ const PcieTopologyStore = { const oneSlot = oneChassis.detailedInfo.pcieSlots.eachSlot[y]; if ( + chassisMembers[index].PCIeSlots.Slots[j].Links?.Oem?.IBM + ?.AssociatedAssembly && oneSlot.associatedAssemblyLink && oneSlot.associatedAssemblyLink === chassisMembers[index].PCIeSlots.Slots[j].Links?.Oem - .IBM.AssociatedAssembly[0]['@odata.id'] + ?.IBM?.AssociatedAssembly['@odata.id'] ) { isAssemblySet = true; singleSlotData['associatedAssembly'] = @@ -285,7 +287,7 @@ const PcieTopologyStore = { if ( oneSlot?.associatedAssemblyLink === chassisMembers[index].PCIeSlots.Slots[j].Links?.Oem.IBM - .AssociatedAssembly[0]['@odata.id'] + .AssociatedAssembly['@odata.id'] ) { isAssemblySet = true; singleSlotData['associatedAssembly'] = @@ -295,11 +297,15 @@ const PcieTopologyStore = { } } } - if (!isAssemblySet) { + if ( + chassisMembers[index]?.PCIeSlots?.Slots[j]?.Links?.Oem?.IBM + ?.AssociatedAssembly && + !isAssemblySet + ) { await api .get( - chassisMembers[index].PCIeSlots.Slots[j].Links?.Oem.IBM - .AssociatedAssembly[0]['@odata.id'] + chassisMembers[index]?.PCIeSlots?.Slots[j]?.Links?.Oem + ?.IBM?.AssociatedAssembly['@odata.id'] ) .then(async (assemblyResponse) => { singleSlotData['associatedAssembly'] = @@ -307,7 +313,7 @@ const PcieTopologyStore = { singleSlotData['associatedAssemblyLink'] = chassisMembers[index].PCIeSlots.Slots[ j - ].Links?.Oem?.IBM?.AssociatedAssembly[0]['@odata.id']; + ].Links?.Oem?.IBM?.AssociatedAssembly['@odata.id']; }) .catch((error) => { console.log('error', error); @@ -654,6 +660,7 @@ const PcieTopologyStore = { ) { cablesData.detailedInfo.downstreamPorts.push({ data: dspPorts[p], + grandParent: dspRes.data, grandParentLocation: dspRes.data?.Location?.PartLocation?.ServiceLabel, }); @@ -785,72 +792,122 @@ const PcieTopologyStore = { } cablesInfo.map((cable) => { if (cable.detailedInfo?.downstreamResources?.length > 0) { + cable.detailedInfo.downstreamResources[0].pcieSlots.map( + (chaSlot) => { + if ( + chaSlot.data?.Oem?.IBM?.LinkId === row.linkId && + chaSlot.data.Links?.Oem?.IBM?.AssociatedAssembly && + chaSlot.data.Links?.Oem?.IBM?.AssociatedAssembly[ + '@odata.id' + ] === cable.detailedInfo.downstreamResourcesUri + ) { + for ( + let i = 0; + i < + cable.detailedInfo?.grandParentInfo?.expanderSlots + ?.length; + i++ + ) { + const expanderSlot = + cable.detailedInfo?.grandParentInfo?.expanderSlots[i]; + if ( + cable.detailedInfo.grandParentInfo.data?.Links + ?.PCIeDevices[0]['@odata.id'] === + expanderSlot.Links?.PCIeDevice[0]['@odata.id'] + ) { + row['linkType'] = 'Secondary'; + row['parentLinkId'] = expanderSlot.Oem?.IBM?.LinkId; + break; + } + } + } + } + ); + } + if (cable.detailedInfo.downstreamChassis.length > 0) { + const downstream_device = + cable.detailedInfo.downstreamPorts[0].grandParent; if ( - slot.associatedAssemblyLink === - cable.detailedInfo.downstreamResourcesUri + slot?.data.Links.PCIeDevice[0]['@odata.id'] === + downstream_device.Links?.PCIeDevices[0]['@odata.id'] ) { for ( let i = 0; - i < - cable.detailedInfo?.grandParentInfo?.expanderSlots?.length; + i < cable.detailedInfo.grandParentInfo.expanderSlots.length; i++ ) { const expanderSlot = - cable.detailedInfo?.grandParentInfo?.expanderSlots[i]; - row['linkType'] = 'Secondary'; - row['parentLinkId'] = expanderSlot.Oem?.IBM?.LinkId; - break; - } - } - } - if (cable.detailedInfo.downstreamChassis.length > 0) { - cable.detailedInfo.downstreamChassis[0].pcieSlots.map( - (singleSlot) => { + cable.detailedInfo.grandParentInfo.expanderSlots[i]; if ( - slot?.pcieDeviceLink === - singleSlot.data?.Links?.PCIeDevice[0]['@odata.id'] + cable.detailedInfo.grandParentInfo.data.Links + ?.PCIeDevices[0]['@odata.id'] === + expanderSlot.Links?.PCIeDevice[0]['@odata.id'] ) { - for ( - let i = 0; - i < - cable.detailedInfo.grandParentInfo.expanderSlots.length; - i++ + row['linkType'] = 'Secondary'; + if ( + expanderSlot?.Links?.Processors && + expanderSlot?.Links?.Processors.length > 0 ) { - const expanderSlot = - cable.detailedInfo.grandParentInfo.expanderSlots[i]; - row['linkType'] = 'Secondary'; - row['parentLinkId'] = expanderSlot.Oem?.IBM?.LinkId; - break; + procMembers.map((proc) => { + if ( + proc['@odata.id'] === + expanderSlot.Links?.Processors[0]['@odata.id'] + ) { + row.pcieHBLocation = { + locationIndicatorActive: + proc?.LocationIndicatorActive, + locationNumber: + proc?.Location?.PartLocation?.ServiceLabel, + uri: proc['@odata.id'], + }; + } + }); } + row['parentLinkId'] = expanderSlot.Oem?.IBM?.LinkId; + break; } } - ); + } } - if (cable.detailedInfo.upstreamPorts.length > 0) { + if ( + cable?.detailedInfo?.upstreamPorts?.length > 0 || + cable?.detailedInfo?.downstreamPorts?.length > 0 + ) { fabricAdapterInfo.map((adapter) => { if ( adapter?.pcieDeviceLink && adapter.pcieDeviceLink === slot.pcieDeviceLink ) { if ( - cable.detailedInfo.upstreamPorts[0][ - '@odata.id' - ].startsWith(adapter.data['@odata.id']) + (cable?.detailedInfo?.upstreamPorts.length > 0 && + cable?.detailedInfo?.upstreamPorts[0][ + '@odata.id' + ].startsWith(adapter.data['@odata.id'])) || + (cable?.detailedInfo?.downstreamPorts.length > 0 && + cable?.detailedInfo?.downstreamPorts[0].data[ + '@odata.id' + ].startsWith(adapter.data['@odata.id'])) ) { if (cable.detailedInfo.downstreamResources.length > 0) { row.ioSlotLocation = []; cable.detailedInfo.downstreamResources[0].pcieSlots.map( (slot2) => { if ( - slot2.Links?.Oem?.IBM?.AssociatedAssembly === - cable.detailedInfo.downstreamResourcesUri + slot2?.data?.Links?.Oem?.IBM + ?.AssociatedAssembly && + slot2?.data?.Links?.Oem?.IBM?.AssociatedAssembly[ + '@odata.id' + ] === cable.detailedInfo.downstreamResourcesUri ) { - if (slot2?.Location?.PartLocation?.ServiceLabel) { + if ( + slot2?.data?.Location?.PartLocation + ?.ServiceLabel + ) { const duplicate = row.ioSlotLocation.find( (obj) => { if ( obj.locationNumber === - slot2?.Location?.PartLocation + slot2?.data.Location?.PartLocation ?.ServiceLabel ) { return true; @@ -860,9 +917,9 @@ const PcieTopologyStore = { if (duplicate === undefined) { row.ioSlotLocation.push({ locationIndicatorActive: - slot2?.LocationIndicatorActive, + slot2?.data.LocationIndicatorActive, locationNumber: - slot2?.Location?.PartLocation + slot2?.data.Location?.PartLocation ?.ServiceLabel, uri: cable.detailedInfo.downstreamResources[0] @@ -880,13 +937,14 @@ const PcieTopologyStore = { cable.detailedInfo.downstreamChassis[0].pcieSlots.map( (dsSlot) => { if ( - dsSlot?.data?.Location?.PartLocation?.ServiceLabel + dsSlot?.data?.Links?.Oem?.IBM + ?.UpstreamFabricAdapter ) { if ( - dsSlot?.data?.Location?.PartLocation?.ServiceLabel.startsWith( - cable.detailedInfo?.downstreamPorts[0] - ?.grandParentLocation - ) + dsSlot?.data?.Links?.Oem?.IBM + ?.UpstreamFabricAdapter['@odata.id'] === + cable.detailedInfo?.downstreamPorts[0] + ?.grandParent['@odata.id'] ) { const duplicate = row.ioSlotLocation.find( (obj) => { @@ -977,6 +1035,48 @@ const PcieTopologyStore = { }); } }); + fabricAdapterInfo.map((adapter) => { + const pcie_device = + adapter.data.Links?.PCIeDevices[0]['@odata.id']; + pcieDeviceMembers.map((device) => { + if (device['@odata.id'] === pcie_device) { + const expander_slots = + device.Links?.Oem?.IBM?.PCIeSlot['@odata.id']; + chassisInfo.map((chassisValue) => { + if ( + chassisValue.detailedInfo.pcieSlotsUri === expander_slots + ) { + chassisValue.detailedInfo.pcieSlots.data.Slots.map( + (slot2) => { + if ( + slot2.Links?.PCIeDevice[0]['@odata.id'] === + pcie_device + ) { + if ( + slot.data?.Links?.Oem?.IBM + ?.UpstreamFabricAdapter && + slot.data?.Links?.Oem?.IBM?.UpstreamFabricAdapter[ + '@odata.id' + ] === adapter.data['@odata.id'] + ) { + row['linkType'] = 'Secondary'; + row['parentLinkId'] = slot2.Oem?.IBM?.LinkId; + rows.map((singleRow) => { + if ( + singleRow.linkId === slot2.Oem?.IBM?.LinkId + ) { + row.pcieHBLocation = singleRow.pcieHBLocation; + } + }); + } + } + } + ); + } + }); + } + }); + }); rows.push(row); commit('setEntries', rows); } diff --git a/src/store/modules/Logs/DeconfigurationRecordsStore.js b/src/store/modules/Logs/DeconfigurationRecordsStore.js index 8504c70f22..91657a6135 100644 --- a/src/store/modules/Logs/DeconfigurationRecordsStore.js +++ b/src/store/modules/Logs/DeconfigurationRecordsStore.js @@ -61,11 +61,11 @@ const DeconfigurationRecordsStore = { : null, LocationCode, } = log; - let pelId = ''; + let eventId = ''; const additionalDataURIValue = log.AdditionalDataURI; if (additionalDataURIValue) { const splitUrl = additionalDataURIValue.split('/'); - pelId = splitUrl[splitUrl.length - 2]; + eventId = splitUrl[splitUrl.length - 2]; } return { additionalDataUri: AdditionalDataURI, @@ -82,7 +82,7 @@ const DeconfigurationRecordsStore = { uri: log['@odata.id'], severity: Severity, location: LocationCode, - pelID: pelId, + eventID: eventId, }; }) ); diff --git a/src/store/modules/Logs/DumpsStore.js b/src/store/modules/Logs/DumpsStore.js index fad367d309..6d11f2dd57 100644 --- a/src/store/modules/Logs/DumpsStore.js +++ b/src/store/modules/Logs/DumpsStore.js @@ -110,7 +110,12 @@ const DumpsStore = { }) .catch((error) => { const errorMsg = error; - + if ( + error.response?.data?.error?.code === + 'Base.1.13.0.ResourceInStandby' + ) { + throw new Error(i18n.t('pageDumps.toast.errorPhypInStandby')); + } switch (errorMsg) { case 'Base.1.8.1.ActionParameterUnknown': throw new Error( diff --git a/src/store/modules/Logs/EventLogStore.js b/src/store/modules/Logs/EventLogStore.js index 2a8abd8e5e..f3c9fe9509 100644 --- a/src/store/modules/Logs/EventLogStore.js +++ b/src/store/modules/Logs/EventLogStore.js @@ -25,6 +25,7 @@ const EventLogStore = { allEvents: [], ceLogs: [], loadedEvents: false, + eventlogs: [], }, getters: { allEvents: (state) => state.allEvents.concat(state.ceLogs), @@ -32,6 +33,7 @@ const EventLogStore = { highPriorityEvents: (state) => getHighPriorityEvents(state.allEvents), healthStatus: (state) => getHealthStatus(state.allEvents, state.loadedEvents), + eventlogs: (state) => state.allEvents.concat(state.ceLogs), }, mutations: { setAllEvents: (state, allEvents) => ( @@ -40,11 +42,14 @@ const EventLogStore = { setCeLogs: (state, ceLogs) => ( (state.ceLogs = ceLogs), (state.loadedEvents = true) ), + eventlogs: (state, eventlogs) => ( + (state.eventlogs = eventlogs), (state.loadedEvents = true) + ), }, actions: { async getEventLogData({ commit }) { let eventLogs = []; - commit('setAllEvents', eventLogs); + commit('eventlogs', eventLogs); commit('setCeLogs', eventLogs); return await api .get('/redfish/v1/Systems/system/LogServices/EventLog/Entries') @@ -79,6 +84,7 @@ const EventLogStore = { additionalDataUri: AdditionalDataURI, }; }); + commit('eventlogs', eventLogs); commit('setAllEvents', eventLogs); }) .catch((error) => { diff --git a/src/store/modules/Operations/BootSettingsStore.js b/src/store/modules/Operations/BootSettingsStore.js index 7b602aef99..9346f73f30 100644 --- a/src/store/modules/Operations/BootSettingsStore.js +++ b/src/store/modules/Operations/BootSettingsStore.js @@ -12,6 +12,7 @@ const BootSettingsStore = { 'pvm_os_boot_type', 'pvm_sys_dump_active', ], + disabled: false, attributeValues: null, automaticRetryConfigValue: '', biosAttributes: null, @@ -26,8 +27,10 @@ const BootSettingsStore = { powerRestorePolicyValue: (state) => state.powerRestorePolicyValue, systemDumpActive: (state) => state.biosAttributes?.pvm_sys_dump_active === 'Enabled', + disabled: (state) => state.disabled, }, mutations: { + setDisabled: (state, disabled) => (state.disabled = disabled), setAttributeValues: (state, attributeValues) => (state.attributeValues = attributeValues), setBiosAttributes: (state, biosAttributes) => @@ -50,9 +53,9 @@ const BootSettingsStore = { }) .catch((error) => console.log(error)); }, - async saveSettings({ dispatch }, { biosSettings }) { + async saveSettings({ dispatch, commit }, { biosSettings }) { const promises = []; - + commit('setDisabled', true); if (biosSettings) { promises.push(dispatch('saveBiosSettings', biosSettings)); } @@ -85,8 +88,12 @@ const BootSettingsStore = { }; }, {}); commit('setBiosAttributes', filteredAttributes); + commit('setDisabled', false); }) - .catch((error) => console.log(error)); + .catch((error) => { + console.log(error); + commit('setDisabled', false); + }); }, async getAttributeValues({ commit, state }) { return await api @@ -142,7 +149,7 @@ const BootSettingsStore = { ) .catch((error) => console.log(error)); }, - saveBiosSettings({ dispatch }, biosSettings) { + saveBiosSettings({ dispatch, commit }, biosSettings) { return api .patch('/redfish/v1/Systems/system/Bios/Settings', { Attributes: biosSettings, @@ -153,6 +160,7 @@ const BootSettingsStore = { }) .catch((error) => { console.log(error); + commit('setDisabled', false); return error; }); }, @@ -171,7 +179,7 @@ const BootSettingsStore = { ); }); }, - saveOperatingModeSettings({ dispatch }) { + saveOperatingModeSettings({ dispatch, commit }) { return api .patch('/redfish/v1/Systems/system', { PowerRestorePolicy: this.state.serverBootSettings @@ -188,6 +196,7 @@ const BootSettingsStore = { }) .catch((error) => { console.log(error); + commit('setDisabled', false); return error; }); }, diff --git a/src/store/modules/ResourceManagement/LicenseStore.js b/src/store/modules/ResourceManagement/LicenseStore.js index e2f624545b..0cc59f5bac 100644 --- a/src/store/modules/ResourceManagement/LicenseStore.js +++ b/src/store/modules/ResourceManagement/LicenseStore.js @@ -37,7 +37,8 @@ const LicenseStore = { license.Name !== 'Permanent Processor Licenses' && license.Name !== 'Firmware Update Access Key' && license.Name !== 'Virtualization Engine Technology' && - license.Name !== 'Trial Processor Licenses' + license.Name !== 'Trial Processor Licenses' && + license.Name !== 'System Anchor' ); }), processorInfo: (state) => parseData(state.licenses.PermProcs), diff --git a/src/store/modules/SecurityAndAccess/SessionsStore.js b/src/store/modules/SecurityAndAccess/SessionsStore.js index 311634e469..8d8c7daf3c 100644 --- a/src/store/modules/SecurityAndAccess/SessionsStore.js +++ b/src/store/modules/SecurityAndAccess/SessionsStore.js @@ -26,11 +26,9 @@ const SessionsStore = { .then((sessionUris) => { const allConnectionsData = sessionUris.map((sessionUri) => { //For filtering IP address to IPv4 - let filteredIPAddress = sessionUri.data?.ClientOriginIPAddress.includes( - '::ffff' - ) - ? sessionUri.data?.ClientOriginIPAddress.slice(7) - : sessionUri.data?.ClientOriginIPAddress; + let filteredIPAddress = sessionUri.data?.ClientOriginIPAddress.split( + '::ffff:' + ).pop(); return { clientID: sessionUri.data?.Context, username: sessionUri.data?.UserName, diff --git a/src/store/modules/SecurityAndAccess/UserManagementStore.js b/src/store/modules/SecurityAndAccess/UserManagementStore.js index 5e90948b98..cde729a1cc 100644 --- a/src/store/modules/SecurityAndAccess/UserManagementStore.js +++ b/src/store/modules/SecurityAndAccess/UserManagementStore.js @@ -153,6 +153,58 @@ const UserManagementStore = { } }); }, + async updateUserfromUserManagement( + { dispatch }, + { + originalUsername, + currentUser, + username, + password, + privilege, + status, + locked, + } + ) { + const data = {}; + const notReadOnly = + privilege !== 'ReadOnly' && currentUser.RoleId !== 'ReadOnly'; + if (username) data.UserName = username; + if (password) data.Password = password; + if (privilege && notReadOnly) { + data.RoleId = privilege; + } else if ( + privilege && + privilege === 'ReadOnly' && + currentUser.RoleId !== 'ReadOnly' + ) { + data.RoleId = privilege; + } + if (status !== undefined) data.Enabled = status; + if (locked !== undefined) data.Locked = locked; + return await api + .patch(`/redfish/v1/AccountService/Accounts/${originalUsername}`, data) + .then(() => dispatch('getUsers')) + .then(() => + i18n.t('pageUserManagement.toast.successUpdateUser', { + username: originalUsername, + }) + ) + .catch((error) => { + const messageId = error?.response?.data?.error?.code; + const message = + messageId === 'Base.1.8.1.PropertyValueFormatError' + ? i18n.t( + 'pageUserManagement.toast.errorUpdateUserPasswordNotAccepted', + { + username: originalUsername, + } + ) + : i18n.t('pageUserManagement.toast.errorUpdateUser', { + username: originalUsername, + }); + throw new Error(message); + }); + }, async updateUser( { dispatch }, { originalUsername, username, password, privilege, status, locked } @@ -160,7 +212,7 @@ const UserManagementStore = { const data = {}; if (username) data.UserName = username; if (password) data.Password = password; - if (privilege && privilege !== 'ReadOnly') data.RoleId = privilege; + if (privilege) data.RoleId = privilege; if (status !== undefined) data.Enabled = status; if (locked !== undefined) data.Locked = locked; return await api @@ -172,7 +224,11 @@ const UserManagementStore = { }) ) .catch((error) => { - const messageId = error?.response?.data?.error?.code; + console.log(error); + + const messageId = + error.response.data['Password@Message.ExtendedInfo'][0].MessageId; + const message = messageId === 'Base.1.8.1.PropertyValueFormatError' ? i18n.t( diff --git a/src/store/modules/Settings/HardwareDeconfigurationStore.js b/src/store/modules/Settings/HardwareDeconfigurationStore.js index fb048edcd9..13e7e282d0 100644 --- a/src/store/modules/Settings/HardwareDeconfigurationStore.js +++ b/src/store/modules/Settings/HardwareDeconfigurationStore.js @@ -59,7 +59,7 @@ const HardwareDeconfigurationStore = { api.spread((...responses) => { const coreData = responses.map(({ data }) => { var msgArgs = 'None'; - var pelId = ''; + var eventId = ''; const conditionsArray = data.Status?.Conditions; if (Array.isArray(conditionsArray) && conditionsArray.length) { const messageArgsArray = conditionsArray[0].MessageArgs; @@ -68,9 +68,9 @@ const HardwareDeconfigurationStore = { } const logEntry = conditionsArray[0].LogEntry; if (logEntry) { - const pelIdUrl = logEntry['@odata.id']; - const splitUrl = pelIdUrl.split('/'); - pelId = splitUrl[splitUrl.length - 1]; + const eventIdUrl = logEntry['@odata.id']; + const splitUrl = eventIdUrl.split('/'); + eventId = splitUrl[splitUrl.length - 1]; } } return { @@ -110,7 +110,7 @@ const HardwareDeconfigurationStore = { ? i18n.t('pageDeconfigurationHardware.table.filter.unknown') : msgArgs, processorId: procId, - pelID: pelId, + eventID: eventId, }; }); return coreData; @@ -134,7 +134,7 @@ const HardwareDeconfigurationStore = { api.spread((...responses) => { const dimmsData = responses.map(({ data }) => { var msgArgs = 'None'; - var pelId = ''; + var eventId = ''; const conditionsArray = data.Status?.Conditions; if (Array.isArray(conditionsArray) && conditionsArray.length) { const messageArgsArray = conditionsArray[0].MessageArgs; @@ -143,9 +143,9 @@ const HardwareDeconfigurationStore = { } const logEntry = conditionsArray[0].LogEntry; if (logEntry) { - const pelIdUrl = logEntry['@odata.id']; - const splitUrl = pelIdUrl.split('/'); - pelId = splitUrl[splitUrl.length - 1]; + const eventIdUrl = logEntry['@odata.id']; + const splitUrl = eventIdUrl.split('/'); + eventId = splitUrl[splitUrl.length - 1]; } } return { @@ -184,7 +184,7 @@ const HardwareDeconfigurationStore = { settings: data.Enabled, uri: data['@odata.id'], available: data.Status?.State, - pelID: pelId, + eventID: eventId, }; }); const dimmsDataFiltered = dimmsData.filter( diff --git a/src/store/modules/Settings/NetworkStore.js b/src/store/modules/Settings/NetworkStore.js index b964fd447f..c02359522b 100644 --- a/src/store/modules/Settings/NetworkStore.js +++ b/src/store/modules/Settings/NetworkStore.js @@ -11,6 +11,7 @@ const NetworkStore = { networkSettings: [], selectedInterfaceId: '', // which tab is selected selectedInterfaceIndex: 0, // which tab is selected + isTableBusy: false, }, getters: { dchpEnabledState: (state) => state.dchpEnabledState, @@ -19,6 +20,7 @@ const NetworkStore = { networkSettings: (state) => state.networkSettings, selectedInterfaceId: (state) => state.selectedInterfaceId, selectedInterfaceIndex: (state) => state.selectedInterfaceIndex, + isTableBusy: (state) => state.isTableBusy, }, mutations: { setDchpEnabledState: (state, dchpEnabledState) => @@ -39,6 +41,7 @@ const NetworkStore = { (state.selectedInterfaceId = selectedInterfaceId), setSelectedInterfaceIndex: (state, selectedInterfaceIndex) => (state.selectedInterfaceIndex = selectedInterfaceIndex), + setIsTableBusy: (state, isTableBusy) => (state.isTableBusy = isTableBusy), setNetworkSettings: (state, data) => { state.networkSettings = data.map(({ data }) => { const { @@ -51,6 +54,7 @@ const NetworkStore = { IPv6StaticAddresses, IPv6Addresses, IPv6DefaultGateway, + IPv6StaticDefaultGateways, MACAddress, StaticNameServers, StatelessAddressAutoConfig, @@ -75,6 +79,7 @@ const NetworkStore = { ipv6: IPv6Addresses ?? [], ipv6DefaultGateway: IPv6DefaultGateway ?? '', ipv6OperatingMode: DHCPv6?.OperatingMode ?? '', + ipv6StaticDefaultGateways: IPv6StaticDefaultGateways ?? [], ipv6UseDnsEnabled: DHCPv6?.UseDNSServers ?? false, ipv6UseDomainNameEnabled: DHCPv6?.UseDomainName ?? false, ipv6UseNtpEnabled: DHCPv6?.UseNTPServers ?? false, @@ -119,10 +124,14 @@ const NetworkStore = { console.log('Network Data:', error); }); }, - async getEthernetDataAfterDelay({ dispatch }) { + async getEthernetDataAfterDelay({ commit, dispatch }) { + commit('setIsTableBusy', true); setTimeout(() => { dispatch('getEthernetData'); }, 10000); + setTimeout(() => { + commit('setIsTableBusy', false); + }, 15000); }, async saveDomainNameState({ commit, state, dispatch }, domainState) { commit('setDomainNameState', domainState); @@ -290,7 +299,12 @@ const NetworkStore = { `/redfish/v1/Managers/bmc/EthernetInterfaces/${state.selectedInterfaceId}`, data ) - .then(dispatch('getEthernetData')) + .then(() => { + // Getting Ethernet data here so that the toggle gets updated + dispatch('getEthernetData'); + // Getting Ethernet data here so that the IPv6 table gets updated + dispatch('getEthernetDataAfterDelay'); + }) .then(() => { return i18n.t('pageNetwork.toast.successSaveNetworkSettings', { setting: i18n.t('pageNetwork.ipv6AutoConfig'), @@ -390,6 +404,49 @@ const NetworkStore = { ); }); }, + async updateIpv6StaticDefaultGatewayAddress( + { dispatch, state }, + newIpv6StaticDefaultGatewayAddress + ) { + const originalAddresses = + state.networkSettings[state.selectedInterfaceIndex] + .ipv6StaticDefaultGateways; + const updatedIpv6 = originalAddresses.map((item) => { + const address = item.Address; + if (find(newIpv6StaticDefaultGatewayAddress, { Address: address })) { + return null; // if address matches then delete address to "edit" + } else { + return {}; // if address doesn't match then skip address, no change + } + }); + const filteredAddress = newIpv6StaticDefaultGatewayAddress.filter( + (item) => item.PrefixLength !== 0 + ); + const updatedIpv6Array = { + IPv6StaticDefaultGateways: [...updatedIpv6, ...filteredAddress], + }; + return api + .patch( + `/redfish/v1/Managers/bmc/EthernetInterfaces/${state.selectedInterfaceId}`, + updatedIpv6Array + ) + .then(() => { + dispatch('getEthernetDataAfterDelay'); + }) + .then(() => { + return i18n.t('pageNetwork.toast.successSaveNetworkSettings', { + setting: i18n.t('pageNetwork.ipv6StaticDefaultGateway'), + }); + }) + .catch((error) => { + console.log(error); + throw new Error( + i18n.t('pageNetwork.toast.errorSaveNetworkSettings', { + setting: i18n.t('pageNetwork.ipv6StaticDefaultGateway'), + }) + ); + }); + }, async deleteIpv4Address({ dispatch, state }, updatedIpv4Array) { const originalAddressArray = state.networkSettings[state.selectedInterfaceIndex].staticIpv4Addresses; @@ -407,7 +464,12 @@ const NetworkStore = { `/redfish/v1/Managers/bmc/EthernetInterfaces/${state.selectedInterfaceId}`, { IPv4StaticAddresses: newIpv4Array } ) - .then(dispatch('getEthernetData')) + .then(() => { + // Getting Ethernet data here so that the address is deleted immediately + dispatch('getEthernetData'); + // Getting Ethernet data here so that the IPv4 table gets updated + dispatch('getEthernetDataAfterDelay'); + }) .then(() => { return i18n.t('pageNetwork.toast.successDeletingIpv4Server'); }) @@ -432,7 +494,12 @@ const NetworkStore = { `/redfish/v1/Managers/bmc/EthernetInterfaces/${state.selectedInterfaceId}`, { IPv6StaticAddresses: newIpv6Array } ) - .then(dispatch('getEthernetData')) + .then(() => { + // Getting Ethernet data here so that the address is deleted immediately + dispatch('getEthernetData'); + // Getting Ethernet data here so that the IPv6 table gets updated + dispatch('getEthernetDataAfterDelay'); + }) .then(() => { return i18n.t('pageNetwork.toast.successDeletingIpv6Server'); }) @@ -441,6 +508,44 @@ const NetworkStore = { throw new Error(i18n.t('pageNetwork.toast.errorDeletingIpv6Server')); }); }, + async deleteIpv6StaticDefaultGatewayAddress( + { dispatch, state }, + updatedIpv6Array + ) { + const originalAddressArray = + state.networkSettings[state.selectedInterfaceIndex] + .ipv6StaticDefaultGateways; + const newIpv6Array = originalAddressArray.map((item) => { + const address = item.Address; + if (find(updatedIpv6Array, { Address: address })) { + return {}; //return addresses that match the updated array + } else { + return null; // delete address that do not match updated array + } + }); + return api + .patch( + `/redfish/v1/Managers/bmc/EthernetInterfaces/${state.selectedInterfaceId}`, + { IPv6StaticDefaultGateways: newIpv6Array } + ) + .then(() => { + // Getting Ethernet data here so that the address is deleted immediately + dispatch('getEthernetData'); + // Getting Ethernet data here so that the table gets updated + dispatch('getEthernetDataAfterDelay'); + }) + .then(() => { + return i18n.t( + 'pageNetwork.toast.successDeletingIpv6StaticDefaultGateway' + ); + }) + .catch((error) => { + console.log(error); + throw new Error( + i18n.t('pageNetwork.toast.errorDeletingIpv6StaticDefaultGateway') + ); + }); + }, async saveHostname({ state, dispatch }, hostname) { return api .patch( diff --git a/src/views/ChangePassword/ChangePassword.vue b/src/views/ChangePassword/ChangePassword.vue index aed891b213..ca514de562 100644 --- a/src/views/ChangePassword/ChangePassword.vue +++ b/src/views/ChangePassword/ChangePassword.vue @@ -123,12 +123,15 @@ export default { password: this.form.password, }; - Promise.all([ - this.$store.dispatch('userManagement/updateUser', data), - this.$store.dispatch('userManagement/getUsers'), - this.$store.dispatch('global/getCurrentUser', this.username), - this.$store.dispatch('global/getSystemInfo'), - ]) + this.$store + .dispatch('userManagement/updateUser', data) + .then(() => { + Promise.all([ + this.$store.dispatch('userManagement/getUsers'), + this.$store.dispatch('global/getCurrentUser', this.username), + this.$store.dispatch('global/getSystemInfo'), + ]); + }) .then(() => this.$router.push('/')) .catch(() => (this.changePasswordError = true)); }, diff --git a/src/views/Logs/DeconfigurationRecords/DeconfigurationRecords.vue b/src/views/Logs/DeconfigurationRecords/DeconfigurationRecords.vue index 5cd949e4d9..cf2cb3d107 100644 --- a/src/views/Logs/DeconfigurationRecords/DeconfigurationRecords.vue +++ b/src/views/Logs/DeconfigurationRecords/DeconfigurationRecords.vue @@ -272,8 +272,8 @@ export default { sortable: true, }, { - key: 'pelID', - label: this.$t('pageDeconfigurationRecords.table.pelId'), + key: 'eventID', + label: this.$t('pageDeconfigurationRecords.table.eventId'), sortable: true, }, { diff --git a/src/views/Logs/EventLogs/EventLogs.vue b/src/views/Logs/EventLogs/EventLogs.vue index 199842cf50..04fe76fa96 100644 --- a/src/views/Logs/EventLogs/EventLogs.vue +++ b/src/views/Logs/EventLogs/EventLogs.vue @@ -442,7 +442,7 @@ export default { : this.filteredLogs.length; }, allLogs() { - return this.$store.getters['eventLog/allEvents'].map((event) => { + return this.$store.getters['eventLog/eventlogs'].map((event) => { return { ...event, actions: [ diff --git a/src/views/Notices/NoticesText.vue b/src/views/Notices/NoticesText.vue index 59161d8221..b25c6ceaa9 100644 --- a/src/views/Notices/NoticesText.vue +++ b/src/views/Notices/NoticesText.vue @@ -1,74 +1,379 @@ diff --git a/src/views/Operations/ServerPowerOperations/BiosSettings.vue b/src/views/Operations/ServerPowerOperations/BiosSettings.vue index 3cb4728a9e..38e6d0855c 100644 --- a/src/views/Operations/ServerPowerOperations/BiosSettings.vue +++ b/src/views/Operations/ServerPowerOperations/BiosSettings.vue @@ -72,6 +72,7 @@ + + +

+ {{ + $t( + 'pageServerPowerOperations.biosSettings.currentOperatingModeManual' + ) + }} +

+

+ {{ + $t( + 'pageServerPowerOperations.biosSettings.selectedOperatingModeNormal' + ) + }} +

+
+
+ + {{ $t(`appPageTitle.powerRestorePolicy`) }} + + {{ + $t( + `pageServerPowerOperations.biosSettings.powPolicySection`, + { + powerPolicy: + powerPolicy === 'AlwaysOff' + ? $t(`pagePowerRestorePolicy.policies.AlwaysOff`) + : powerPolicy === 'AlwaysOn' + ? $t(`pagePowerRestorePolicy.policies.AlwaysOn`) + : $t(`pagePowerRestorePolicy.policies.LastState`), + } + ) + }} +
+

@@ -149,6 +193,7 @@ v-model="attributeKeys[key]" :value="values.value" :aria-describedby="values.value" + :disabled="disabled" > diff --git a/src/views/Settings/Network/Network.vue b/src/views/Settings/Network/Network.vue index 8fff98d564..97b494deae 100644 --- a/src/views/Settings/Network/Network.vue +++ b/src/views/Settings/Network/Network.vue @@ -26,6 +26,8 @@

+ + @@ -53,6 +55,12 @@ :edit-modal="ipAddressIpv6 !== ''" @ok="saveIpv6Address" /> + @@ -65,6 +73,7 @@ import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; import ModalHostname from './ModalHostname.vue'; import ModalIpv4 from './ModalIpv4.vue'; import ModalIpv6 from './ModalIpv6.vue'; +import ModalIpv6StaticDefaultGateway from './ModalIpv6StaticDefaultGateway.vue'; import ModalDns from './ModalDns.vue'; import NetworkGlobalSettings from './NetworkGlobalSettings.vue'; import NetworkInterfaceSettings from './NetworkInterfaceSettings.vue'; @@ -73,6 +82,7 @@ import PageTitle from '@/components/Global/PageTitle'; import TableIpv4 from './TableIpv4.vue'; import TableDns from './TableDns.vue'; import TableIpv6 from './TableIpv6.vue'; +import TableIpv6StaticDefaultGateway from './TableIpv6StaticDefaultGateway.vue'; export default { name: 'Network', @@ -80,6 +90,7 @@ export default { ModalHostname, ModalIpv4, ModalIpv6, + ModalIpv6StaticDefaultGateway, ModalDns, NetworkGlobalSettings, NetworkInterfaceSettings, @@ -88,6 +99,7 @@ export default { TableDns, TableIpv4, TableIpv6, + TableIpv6StaticDefaultGateway, }, mixins: [BVToastMixin, DataFormatterMixin, LoadingBarMixin], beforeRouteLeave(to, from, next) { @@ -100,6 +112,8 @@ export default { defaultGateway: '', ipAddress: '', ipAddressIpv6: '', + ipAddressIpv6StaticDefaultGateway: '', + prefixLengthIpv6StaticDefaultGateway: 0, prefixLength: 0, subnet: '', loading, @@ -127,7 +141,9 @@ export default { this.subnet = item.SubnetMask; this.ipAddressIpv6 = item.Address; this.ipAddress = item.Address; + this.ipAddressIpv6StaticDefaultGateway = item.Address; this.prefixLength = item.PrefixLength; + this.prefixLengthIpv6StaticDefaultGateway = item.PrefixLength; }); }, created() { @@ -221,6 +237,40 @@ export default { }); } }, + saveIpv6StaticDefaultGatewayAddress(modalFormData) { + const modalData = [modalFormData]; + this.startLoader(); + if (this.ipAddressIpv6StaticDefaultGateway !== '') { + //Edit selected row + const selectedRow = { + Address: this.ipAddressIpv6StaticDefaultGateway, + PrefixLength: 0, + }; + const editRow = modalData.concat(selectedRow); + this.$store + .dispatch('network/updateIpv6StaticDefaultGatewayAddress', editRow) + .then((message) => { + this.successToast(message); + this.setEndLoaderAfterDelay(); + }) + .catch(({ message }) => { + this.errorToast(message); + this.endLoader(); + }); + } else { + // Add new address + this.$store + .dispatch('network/updateIpv6StaticDefaultGatewayAddress', modalData) + .then((message) => { + this.successToast(message); + this.setEndLoaderAfterDelay(); + }) + .catch(({ message }) => { + this.errorToast(message); + this.endLoader(); + }); + } + }, saveDnsAddress(modalFormData) { this.startLoader(); this.$store @@ -240,7 +290,7 @@ export default { setEndLoaderAfterDelay() { setTimeout(() => { this.endLoader(); - }, 10000); + }, 15000); }, }, }; diff --git a/src/views/Settings/Network/TableIpv4.vue b/src/views/Settings/Network/TableIpv4.vue index 6aa31d4a50..f1c673e908 100644 --- a/src/views/Settings/Network/TableIpv4.vue +++ b/src/views/Settings/Network/TableIpv4.vue @@ -11,6 +11,7 @@ v-model="dhcpEnabledState" data-test-id="networkSettings-switch-dhcpEnabled" switch + :disabled="isTablesDisabled" @change="changeDhcpEnabledState" > @@ -24,7 +25,11 @@ - + {{ $t('pageNetwork.table.addIpv4Address') }} @@ -36,6 +41,7 @@ :fields="ipv4TableFields" :items="form.ipv4TableItems" :empty-text="$t('global.table.emptyMessage')" + :busy="isTablesDisabled" class="mb-0" show-empty > @@ -121,6 +127,9 @@ export default { }; }, computed: { + isTablesDisabled() { + return this.$store.getters['network/isTableBusy']; + }, network() { return this.$store.getters['network/networkSettings']; }, @@ -180,12 +189,14 @@ export default { }); }, onIpv4TableAction(action, $event, item) { - if ($event === 'edit') { - this.$root.$emit('edit-address', item); - this.initIpv4Modal(); - } - if ($event === 'delete') { - this.deleteIpv4TableRow(item); + if (!this.isTablesDisabled) { + if ($event === 'edit') { + this.$root.$emit('edit-address', item); + this.initIpv4Modal(); + } + if ($event === 'delete') { + this.deleteIpv4TableRow(item); + } } }, deleteIpv4TableRow(item) { @@ -216,7 +227,13 @@ export default { if (deleteConfirmed) { this.$store .dispatch('network/deleteIpv4Address', newIpv4Array) - .then((message) => this.successToast(message)) + .then((message) => { + this.successToast(message); + this.startLoader(); + setTimeout(() => { + this.endLoader(); + }, 15000); + }) .catch(({ message }) => this.errorToast(message)); } }); @@ -252,7 +269,7 @@ export default { this.startLoader(); setTimeout(() => { this.endLoader(); - }, 10000); + }, 15000); }) .catch(({ message }) => this.errorToast(message)); } else { diff --git a/src/views/Settings/Network/TableIpv6.vue b/src/views/Settings/Network/TableIpv6.vue index eb6cf2d441..d28accd7c0 100644 --- a/src/views/Settings/Network/TableIpv6.vue +++ b/src/views/Settings/Network/TableIpv6.vue @@ -10,6 +10,7 @@ id="dhcpIpv6Switch" v-model="dhcpEnabledState" switch + :disabled="isTablesDisabled" @change="changeIpv6DhcpEnabledState" > @@ -28,6 +29,7 @@ id="ipv6AutoConfigSwitch" v-model="ipv6AutoConfigState" switch + :disabled="isTablesDisabled" @change="changeIpv6AutoConfigState" > @@ -38,10 +40,20 @@ + +
+
{{ $t('pageNetwork.ipv6DefaultGateway') }}
+
{{ ipv6DefaultGateway }}
+
+
- + {{ $t('pageNetwork.table.addIpv6Address') }} @@ -53,6 +65,7 @@ :fields="ipv6TableFields" :items="form.ipv6TableItems" :empty-text="$t('global.table.emptyMessage')" + :busy="isTablesDisabled" class="mb-0" show-empty > @@ -134,12 +147,20 @@ export default { }; }, computed: { + isTablesDisabled() { + return this.$store.getters['network/isTableBusy']; + }, network() { return this.$store.getters['network/networkSettings']; }, selectedInterface() { return this.$store.getters['network/selectedInterfaceIndex']; }, + ipv6DefaultGateway() { + return this.$store.getters['network/networkSettings'][ + this.selectedInterface + ].ipv6DefaultGateway; + }, dhcpEnabledState: { get() { return this.$store.getters['network/networkSettings'][ @@ -206,12 +227,14 @@ export default { }); }, onIpv6TableAction(action, $event, item) { - if ($event === 'edit') { - this.$root.$emit('edit-address', item); - this.initIpv6Modal(); - } - if ($event === 'delete') { - this.deleteIpv6TableRow(item); + if (!this.isTablesDisabled) { + if ($event === 'edit') { + this.$root.$emit('edit-address', item); + this.initIpv6Modal(); + } + if ($event === 'delete') { + this.deleteIpv6TableRow(item); + } } }, deleteIpv6TableRow(item) { @@ -241,7 +264,13 @@ export default { if (deleteConfirmed) { this.$store .dispatch('network/deleteIpv6Address', newIpv6Array) - .then((message) => this.successToast(message)) + .then((message) => { + this.successToast(message); + this.startLoader(); + setTimeout(() => { + this.endLoader(); + }, 15000); + }) .catch(({ message }) => this.errorToast(message)); } }); @@ -257,7 +286,7 @@ export default { this.startLoader(); setTimeout(() => { this.endLoader(); - }, 10000); + }, 15000); }) .catch(({ message }) => this.errorToast(message)); }, @@ -265,7 +294,11 @@ export default { this.$store .dispatch('network/saveIpv6AutoConfigState', state) .then((success) => { + this.startLoader(); this.successToast(success); + setTimeout(() => { + this.endLoader(); + }, 15000); }) .catch(({ message }) => this.errorToast(message)); }, diff --git a/src/views/Settings/Network/TableIpv6StaticDefaultGateway.vue b/src/views/Settings/Network/TableIpv6StaticDefaultGateway.vue new file mode 100644 index 0000000000..1ab2eb1c51 --- /dev/null +++ b/src/views/Settings/Network/TableIpv6StaticDefaultGateway.vue @@ -0,0 +1,206 @@ + + +