Filtered the IP address to IPv4 on sessions page
The IP address on sessions page is comming IPv6. It should be shown
IPv4 address.
Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com>
Change-Id: I4d5d492b161c09a09f616849ad9d0e6eb32e9fd8
diff --git a/src/store/modules/SecurityAndAccess/SessionsStore.js b/src/store/modules/SecurityAndAccess/SessionsStore.js
index 54607ab..37ba9fc 100644
--- a/src/store/modules/SecurityAndAccess/SessionsStore.js
+++ b/src/store/modules/SecurityAndAccess/SessionsStore.js
@@ -25,10 +25,14 @@
)
.then((sessionUris) => {
const allConnectionsData = sessionUris.map((sessionUri) => {
+ //For filtering IP address to IPv4
+ let filteredIPAddress = sessionUri.data?.ClientOriginIPAddress.slice(
+ 7
+ );
return {
clientID: sessionUri.data?.Oem?.OpenBMC.ClientID,
username: sessionUri.data?.UserName,
- ipAddress: sessionUri.data?.ClientOriginIPAddress,
+ ipAddress: filteredIPAddress,
uri: sessionUri.data['@odata.id'],
};
});