fix: use remoteDestination replace DestinationIP in connection page, #2668 (#2679)

* fix: use remoteDestination replace DestinationIP  in connection page, #2668

* add: missing i18n text

* fix: display the target address details in connection page
This commit is contained in:
Christine. 2025-02-11 14:52:27 +08:00 committed by GitHub
parent e230981ac4
commit d895b68f04
10 changed files with 23 additions and 14 deletions

View File

@ -51,8 +51,8 @@ const InnerConnectionDetail = ({ data, onClose }: InnerProps) => {
const chains = [...data.chains].reverse().join(" / "); const chains = [...data.chains].reverse().join(" / ");
const rule = rulePayload ? `${data.rule}(${rulePayload})` : data.rule; const rule = rulePayload ? `${data.rule}(${rulePayload})` : data.rule;
const host = metadata.host const host = metadata.host
? `${metadata.host}:${metadata.destinationPort}` ? `${metadata.host}:${metadata.remoteDestination}`
: `${metadata.destinationIP}:${metadata.destinationPort}`; : `${metadata.remoteDestination}:${metadata.destinationPort}`;
const information = [ const information = [
{ label: t("Host"), value: host }, { label: t("Host"), value: host },
@ -79,7 +79,8 @@ const InnerConnectionDetail = ({ data, onClose }: InnerProps) => {
label: t("Source"), label: t("Source"),
value: `${metadata.sourceIP}:${metadata.sourcePort}`, value: `${metadata.sourceIP}:${metadata.sourcePort}`,
}, },
{ label: t("Destination IP"), value: metadata.destinationIP }, { label: t("Destination"), value: metadata.remoteDestination },
{ label: t("DestinationPort"), value: `${metadata.destinationPort}` },
{ label: t("Type"), value: `${metadata.type}(${metadata.network})` }, { label: t("Type"), value: `${metadata.type}(${metadata.network})` },
]; ];

View File

@ -71,8 +71,8 @@ export const ConnectionTable = (props: Props) => {
}, },
{ field: "source", headerName: t("Source"), flex: 200, minWidth: 130 }, { field: "source", headerName: t("Source"), flex: 200, minWidth: 130 },
{ {
field: "destinationIP", field: "remoteDestination",
headerName: t("Destination IP"), headerName: t("Destination"),
flex: 200, flex: 200,
minWidth: 130, minWidth: 130,
}, },
@ -88,7 +88,7 @@ export const ConnectionTable = (props: Props) => {
id: each.id, id: each.id,
host: metadata.host host: metadata.host
? `${metadata.host}:${metadata.destinationPort}` ? `${metadata.host}:${metadata.destinationPort}`
: `${metadata.destinationIP}:${metadata.destinationPort}`, : `${metadata.remoteDestination}:${metadata.destinationPort}`,
download: each.download, download: each.download,
upload: each.upload, upload: each.upload,
dlSpeed: each.curDownload, dlSpeed: each.curDownload,
@ -98,7 +98,7 @@ export const ConnectionTable = (props: Props) => {
process: truncateStr(metadata.process || metadata.processPath), process: truncateStr(metadata.process || metadata.processPath),
time: each.start, time: each.start,
source: `${metadata.sourceIP}:${metadata.sourcePort}`, source: `${metadata.sourceIP}:${metadata.sourcePort}`,
destinationIP: metadata.destinationIP, remoteDestination: `${metadata.remoteDestination}:${metadata.destinationPort}`,
type: `${metadata.type}(${metadata.network})`, type: `${metadata.type}(${metadata.network})`,
connectionData: each, connectionData: each,
}; };

View File

@ -178,7 +178,8 @@
"Process": "عملية", "Process": "عملية",
"Time": "الوقت", "Time": "الوقت",
"Source": "المصدر", "Source": "المصدر",
"Destination IP": "عنوان IP الوجهة", "Destination": "عنوان IP الوجهة",
"DestinationPort": "ميناء الوجهة",
"Close Connection": "إغلاق الاتصال", "Close Connection": "إغلاق الاتصال",
"Rules": "القواعد", "Rules": "القواعد",
"Rule Provider": "مزود القواعد", "Rule Provider": "مزود القواعد",

View File

@ -178,7 +178,8 @@
"Process": "Process", "Process": "Process",
"Time": "Time", "Time": "Time",
"Source": "Source", "Source": "Source",
"Destination IP": "Destination IP", "Destination": "Destination IP",
"DestinationPort": "Destination Port",
"Close Connection": "Close Connection", "Close Connection": "Close Connection",
"Rules": "Rules", "Rules": "Rules",
"Rule Provider": "Rule Provider", "Rule Provider": "Rule Provider",

View File

@ -178,7 +178,8 @@
"Process": "فرآیند", "Process": "فرآیند",
"Time": "زمان", "Time": "زمان",
"Source": "منبع", "Source": "منبع",
"Destination IP": "آدرس IP مقصد", "Destination": "آدرس IP مقصد",
"DestinationPort": "بندر هدف",
"Close Connection": "بستن اتصال", "Close Connection": "بستن اتصال",
"Rules": "قوانین", "Rules": "قوانین",
"Rule Provider": "تأمین‌کننده قانون", "Rule Provider": "تأمین‌کننده قانون",

View File

@ -210,7 +210,8 @@
"Process": "Proses", "Process": "Proses",
"Time": "Waktu", "Time": "Waktu",
"Source": "Sumber", "Source": "Sumber",
"Destination IP": "IP Tujuan", "Destination": "IP Tujuan",
"DestinationPort": "Port Tujuan",
"Close Connection": "Tutup Koneksi", "Close Connection": "Tutup Koneksi",
"Rules": "Aturan", "Rules": "Aturan",
"Rule Provider": "Penyedia Aturan", "Rule Provider": "Penyedia Aturan",

View File

@ -178,7 +178,8 @@
"Process": "Процесс", "Process": "Процесс",
"Time": "Время подключения", "Time": "Время подключения",
"Source": "Исходный адрес", "Source": "Исходный адрес",
"Destination IP": "IP-адрес назначения", "Destination": "IP-адрес назначения",
"DestinationPort": "Целевой порт",
"Close Connection": "Закрыть соединение", "Close Connection": "Закрыть соединение",
"Rules": "Правила", "Rules": "Правила",
"Rule Provider": "Провайдер правило", "Rule Provider": "Провайдер правило",

View File

@ -178,7 +178,8 @@
"Process": "Процесс", "Process": "Процесс",
"Time": "Тоташу вакыты", "Time": "Тоташу вакыты",
"Source": "Чыганак адресы", "Source": "Чыганак адресы",
"Destination IP": "Максат IP-адресы", "Destination": "Максат IP-адресы",
"DestinationPort": "Барасы порты",
"Close Connection": "Тоташуны ябу", "Close Connection": "Тоташуны ябу",
"Rules": "Кагыйдәләр", "Rules": "Кагыйдәләр",
"Rule Provider": "Кагыйдә провайдеры", "Rule Provider": "Кагыйдә провайдеры",

View File

@ -178,7 +178,8 @@
"Process": "进程", "Process": "进程",
"Time": "连接时间", "Time": "连接时间",
"Source": "源地址", "Source": "源地址",
"Destination IP": "目标地址", "Destination": "目标地址",
"DestinationPort": "目标端口",
"Close Connection": "关闭连接", "Close Connection": "关闭连接",
"Rules": "规则", "Rules": "规则",
"Rule Provider": "规则集合", "Rule Provider": "规则集合",

View File

@ -120,6 +120,7 @@ interface IConnectionsItem {
sourcePort: string; sourcePort: string;
destinationPort: string; destinationPort: string;
destinationIP?: string; destinationIP?: string;
remoteDestination?: string;
process?: string; process?: string;
processPath?: string; processPath?: string;
}; };