feat(traffic): разделить плоскости IPFIX и показать путь JH→EN
Docker images / prepare-release (push) Successful in 8s
Docker images / backend-image (push) Failing after 1m31s
Docker images / frontend-image (push) Successful in 2m36s
Docker images / notify-webhook (push) Skipped
Docker images / updater-image (push) Successful in 42s
Docker images / publish-release (push) Skipped
Docker images / prepare-release (push) Successful in 8s
Docker images / backend-image (push) Failing after 1m31s
Docker images / frontend-image (push) Successful in 2m36s
Docker images / notify-webhook (push) Skipped
Docker images / updater-image (push) Successful in 42s
Docker images / publish-release (push) Skipped
Считать payload отдельно от overlay GRE/ESP и mesh; вкладка Пути и KPI Wire из счётчиков iface. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -3,6 +3,7 @@ import type {
|
||||
FlowClientsDto,
|
||||
FlowExportersDto,
|
||||
FlowMonthlyDto,
|
||||
FlowPurgeDto,
|
||||
FlowStatsDto,
|
||||
TrafficFlowHostFile,
|
||||
TrafficFlowOverlayResult,
|
||||
@@ -61,6 +62,8 @@ function flowQuery(params: {
|
||||
userId?: string
|
||||
iface?: string
|
||||
dedup?: boolean
|
||||
excludeMesh?: boolean
|
||||
excludeOverlay?: boolean
|
||||
}): string {
|
||||
const q = new URLSearchParams()
|
||||
if (params.range) q.set("range", params.range)
|
||||
@@ -69,6 +72,10 @@ function flowQuery(params: {
|
||||
if (params.iface && params.iface !== "__all__") q.set("iface", params.iface)
|
||||
if (params.dedup === false) q.set("dedup", "0")
|
||||
else if (params.dedup === true) q.set("dedup", "1")
|
||||
if (params.excludeMesh === false) q.set("excludeMesh", "0")
|
||||
else if (params.excludeMesh === true) q.set("excludeMesh", "1")
|
||||
if (params.excludeOverlay === false) q.set("excludeOverlay", "0")
|
||||
else if (params.excludeOverlay === true) q.set("excludeOverlay", "1")
|
||||
const s = q.toString()
|
||||
return s ? `?${s}` : ""
|
||||
}
|
||||
@@ -83,7 +90,15 @@ export async function getFlowClients(baseUrl: string, range = "5m"): Promise<Flo
|
||||
|
||||
export async function getFlowAnalytics(
|
||||
baseUrl: string,
|
||||
params: { range?: string; serverId?: string; userId?: string; iface?: string; dedup?: boolean },
|
||||
params: {
|
||||
range?: string
|
||||
serverId?: string
|
||||
userId?: string
|
||||
iface?: string
|
||||
dedup?: boolean
|
||||
excludeMesh?: boolean
|
||||
excludeOverlay?: boolean
|
||||
},
|
||||
): Promise<FlowAnalyticsDto> {
|
||||
return requestJson<FlowAnalyticsDto>(baseUrl, `/api/traffic/flow/analytics${flowQuery(params)}`)
|
||||
}
|
||||
@@ -98,4 +113,8 @@ export async function getFlowMonthly(
|
||||
return requestJson<FlowMonthlyDto>(baseUrl, `/api/traffic/flow/monthly?${q.toString()}`)
|
||||
}
|
||||
|
||||
export async function purgeTrafficFlowData(baseUrl: string): Promise<FlowPurgeDto> {
|
||||
return requestJson<FlowPurgeDto>(baseUrl, "/api/traffic/flow/purge", { method: "POST" })
|
||||
}
|
||||
|
||||
export { flowQuery }
|
||||
|
||||
Reference in New Issue
Block a user