diff --git a/src/locales/en.json b/src/locales/en.json index b29450a6..dc599624 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -178,7 +178,7 @@ "Process": "Process", "Time": "Time", "Source": "Source", - "Destination": "Destination IP", + "Destination": "Destination", "DestinationPort": "Destination Port", "Close Connection": "Close Connection", "Rules": "Rules", diff --git a/src/pages/connections.tsx b/src/pages/connections.tsx index a827b389..dc7f63ef 100644 --- a/src/pages/connections.tsx +++ b/src/pages/connections.tsx @@ -127,9 +127,8 @@ const ConnectionsPage = () => { return isPaused ? (frozenData ?? connData) : connData; }, [isPaused, frozenData, connData]); - const [filterConn, download, upload] = useMemo(() => { + const [filterConn] = useMemo(() => { const orderFunc = orderOpts[curOrderOpt]; - let connections = displayData.connections.filter((conn) => { const { host, destinationIP, process } = conn.metadata; return ( @@ -139,13 +138,7 @@ const ConnectionsPage = () => { if (orderFunc) connections = orderFunc(connections); - let download = 0; - let upload = 0; - connections.forEach((x) => { - download += x.download; - upload += x.upload; - }); - return [connections, download, upload]; + return [connections]; }, [displayData, match, curOrderOpt]); const onCloseAll = useLockFn(closeAllConnections); @@ -181,10 +174,10 @@ const ConnectionsPage = () => { header={ - {t("Downloaded")}: {parseTraffic(download)} + {t("Downloaded")}: {parseTraffic(displayData.downloadTotal)} - {t("Uploaded")}: {parseTraffic(upload)} + {t("Uploaded")}: {parseTraffic(displayData.uploadTotal)}