fix(connections): destination and host

This commit is contained in:
kunish 2023-09-01 15:49:47 +08:00
parent 3b774b9423
commit bbfd5142a3
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -148,7 +148,9 @@ export default () => {
{ {
accessorKey: AccessorKey.Host, accessorKey: AccessorKey.Host,
accessorFn: (row) => 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, accessorKey: AccessorKey.Rule,
@ -192,9 +194,9 @@ export default () => {
{ {
accessorKey: AccessorKey.Destination, accessorKey: AccessorKey.Destination,
accessorFn: (row) => accessorFn: (row) =>
isIPv6(row.metadata.destinationIP) row.metadata.remoteDestination ||
? `[${row.metadata.destinationIP}]:${row.metadata.destinationPort}` row.metadata.destinationIP ||
: `${row.metadata.destinationIP}:${row.metadata.destinationPort}`, row.metadata.host,
}, },
] ]