feat(Connections): Display rulePayload if possible (#655)
This commit is contained in:
parent
e21d558996
commit
05691cc829
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ function formatConnectionDataItem(
|
||||||
prevKv: Record<string, { upload: number; download: number }>,
|
prevKv: Record<string, { upload: number; download: number }>,
|
||||||
now: number
|
now: number
|
||||||
): FormattedConn {
|
): FormattedConn {
|
||||||
const { id, metadata, upload, download, start, chains, rule } = i;
|
const { id, metadata, upload, download, start, chains, rule, rulePayload } = i;
|
||||||
const { host, destinationPort, destinationIP, network, type, sourceIP, sourcePort } = metadata;
|
const { host, destinationPort, destinationIP, network, type, sourceIP, sourcePort } = metadata;
|
||||||
// host could be an empty string if it's direct IP connection
|
// host could be an empty string if it's direct IP connection
|
||||||
let host2 = host;
|
let host2 = host;
|
||||||
|
@ -88,7 +88,7 @@ function formatConnectionDataItem(
|
||||||
download,
|
download,
|
||||||
start: now - new Date(start).valueOf(),
|
start: now - new Date(start).valueOf(),
|
||||||
chains: chains.reverse().join(' / '),
|
chains: chains.reverse().join(' / '),
|
||||||
rule,
|
rule: (rulePayload == null | rulePayload === '') ? rule : (`${rule}(${rulePayload})`),
|
||||||
...metadata,
|
...metadata,
|
||||||
host: `${host2}:${destinationPort}`,
|
host: `${host2}:${destinationPort}`,
|
||||||
type: `${type}(${network})`,
|
type: `${type}(${network})`,
|
||||||
|
|
Loading…
Reference in a new issue