feat: add flow-based country traffic visualization to agent summary globe and fix compilation errors
This commit is contained in:
1 parent
e9f35c5a6b
commit
8cd4f95856
5 files changed
+164
-11
No files matched your search
@@ -313,7 +313,7 @@ export function DeviceDetailModal({ ip, deviceLabel, macAddress, onClose }: Prop
|
||||
data.flows.length === 0 ? <Empty msg="Tidak ada flows untuk device ini." /> : (
|
||||
<TableWrap head={["Destination IP", "Port", "Domain / App", "Proto", "↓", "↑", "Last Seen"]}>
|
||||
{data.flows.map((f, i) => {
|
||||
const exp = explainAppOrPort(f.app_label, f.domain, f.dst_port || 0);
|
||||
const exp = explainAppOrPort(f.app_label ?? null, f.domain ?? null, f.dst_port || 0);
|
||||
return (
|
||||
<tr key={i} className="hover:bg-white/[0.03] transition-colors">
|
||||
<td className="px-3 py-2 whitespace-nowrap">
|
||||
|
||||
@@ -23,7 +23,22 @@ const COUNTRY_COORDS: Record<string, [number, number]> = {
|
||||
"LU": [6.1296, 49.8153],
|
||||
"NL": [5.2913, 52.1326],
|
||||
"TR": [35.2433, 38.9637],
|
||||
"UA": [31.1656, 48.3794]
|
||||
"UA": [31.1656, 48.3794],
|
||||
"RU": [105.3188, 61.5240],
|
||||
"HU": [19.5033, 47.1625],
|
||||
"BD": [90.3563, 23.6850],
|
||||
"AU": [133.7751, -25.2744],
|
||||
"IN": [78.9629, 20.5937],
|
||||
"DE": [10.4515, 51.1657],
|
||||
"FR": [2.2137, 46.2276],
|
||||
"ES": [-3.7492, 40.4637],
|
||||
"BR": [-51.9253, -14.2350],
|
||||
"MY": [101.9758, 4.2105],
|
||||
"TH": [100.9925, 15.8700],
|
||||
"VN": [108.2772, 14.0583],
|
||||
"PH": [121.7740, 12.8797],
|
||||
"TW": [120.9605, 23.6978],
|
||||
"GR": [21.8243, 39.0742]
|
||||
};
|
||||
|
||||
// Jakarta, Indonesia as Origin
|
||||
|
||||
@@ -129,6 +129,7 @@ export interface DeviceStat {
|
||||
download: number;
|
||||
upload: number;
|
||||
last_seen: string;
|
||||
is_gateway_routed?: number | null;
|
||||
}
|
||||
|
||||
export interface ThreatStat {
|
||||
|
||||
Reference in new issue
Block a user