Skip to content

Commit

Permalink
Merge branch 'ibm-openbmc:1050' into ledchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
Patel-Kamalkumar authored Dec 11, 2023
2 parents 0c4673b + cd35234 commit 810deb0
Show file tree
Hide file tree
Showing 32 changed files with 3,275 additions and 2,557 deletions.
17 changes: 12 additions & 5 deletions src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@
"locationCode": "Location Code",
"name": "Name",
"pelId": "Pel ID",
"eventId": "Event ID",
"settings": "Settings",
"size": "Size in mebibytes"
}
Expand Down Expand Up @@ -497,6 +498,7 @@
"id": "Id",
"name": "Name",
"pelId": "Pel Id",
"eventId": "Event ID",
"reference": "Reference",
"resource": "Resource",
"severity": "Severity",
Expand Down Expand Up @@ -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"
},
Expand All @@ -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)",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
198 changes: 149 additions & 49 deletions src/store/modules/HardwareStatus/PcieTopologyStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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'] =
Expand All @@ -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'] =
Expand All @@ -295,19 +297,23 @@ 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'] =
assemblyResponse.data;
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);
Expand Down Expand Up @@ -654,6 +660,7 @@ const PcieTopologyStore = {
) {
cablesData.detailedInfo.downstreamPorts.push({
data: dspPorts[p],
grandParent: dspRes.data,
grandParentLocation:
dspRes.data?.Location?.PartLocation?.ServiceLabel,
});
Expand Down Expand Up @@ -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;
Expand All @@ -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]
Expand All @@ -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) => {
Expand Down Expand Up @@ -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);
}
Expand Down
Loading

0 comments on commit 810deb0

Please sign in to comment.