Docker images / prepare-release (push) Successful in 11s
Docker images / backend-test (push) Successful in 3s
Docker images / frontend-image (push) Successful in 2m14s
Docker images / updater-image (push) Successful in 40s
Docker images / netflow-agent-image (push) Successful in 34s
Docker images / backend-image (push) Successful in 16s
Docker images / publish-release (push) Successful in 10s
Docker images / notify-webhook (push) Successful in 1s
8 lines
543 B
TypeScript
8 lines
543 B
TypeScript
import type { FlowTalkerDto } from "@mmapp/contracts/traffic-flow"
|
|
|
|
export function matchesMapService(row: Pick<FlowTalkerDto, "service" | "category" | "dstCountry">, label: string, country?: string) {
|
|
const service = row.service === label || row.category === label && (row.service === "Прочее" || ["DNS", "SSH", "BGP"].includes(label))
|
|
if (!service || !country) return service
|
|
return country === "unknown" ? !row.dstCountry || row.dstCountry.toLowerCase() === "unknown" : row.dstCountry?.toUpperCase() === country.toUpperCase()
|
|
}
|