From bbfd5142a3bb8ac2ea1888befaff64c7b522010e Mon Sep 17 00:00:00 2001 From: kunish Date: Fri, 1 Sep 2023 15:49:47 +0800 Subject: [PATCH] fix(connections): destination and host --- src/pages/Connections.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/Connections.tsx b/src/pages/Connections.tsx index ec1582b0..1310b3a6 100644 --- a/src/pages/Connections.tsx +++ b/src/pages/Connections.tsx @@ -148,7 +148,9 @@ export default () => { { accessorKey: AccessorKey.Host, accessorFn: (row) => - row.metadata.host ? row.metadata.host : row.metadata.destinationIP, + `${ + row.metadata.host ? row.metadata.host : row.metadata.destinationIP + }:${row.metadata.destinationPort}`, }, { accessorKey: AccessorKey.Rule, @@ -192,9 +194,9 @@ export default () => { { accessorKey: AccessorKey.Destination, accessorFn: (row) => - isIPv6(row.metadata.destinationIP) - ? `[${row.metadata.destinationIP}]:${row.metadata.destinationPort}` - : `${row.metadata.destinationIP}:${row.metadata.destinationPort}`, + row.metadata.remoteDestination || + row.metadata.destinationIP || + row.metadata.host, }, ]