fix(traffic): восстановить распознавание видеосервисов на карте
Docker images / prepare-release (push) Successful in 11s
Docker images / backend-test (push) Successful in 10m55s
Docker images / backend-image (push) Successful in 1m58s
Docker images / frontend-image (push) Successful in 2m17s
Docker images / updater-image (push) Successful in 40s
Docker images / netflow-agent-image (push) Successful in 32s
Docker images / notify-webhook (push) Successful in 2s
Docker images / publish-release (push) Successful in 10s
Docker images / prepare-release (push) Successful in 11s
Docker images / backend-test (push) Successful in 10m55s
Docker images / backend-image (push) Successful in 1m58s
Docker images / frontend-image (push) Successful in 2m17s
Docker images / updater-image (push) Successful in 40s
Docker images / netflow-agent-image (push) Successful in 32s
Docker images / notify-webhook (push) Successful in 2s
Docker images / publish-release (push) Successful in 10s
Показать среднюю скорость и время последней минуты с потоками.
This commit is contained in:
1 parent
7cf17c7283
commit
4097e1a6fc
15 files changed
+122
-61
No files matched your search
@@ -23,8 +23,12 @@ test("live GRE does not hash metrics and probe values retain zero and fractions"
|
||||
|
||||
test("a filtered topology does not inherit a service's full-network traffic composition", () => {
|
||||
const service = {id: "svc:dns", label: "DNS", category: "DNS", bytes: 100, bps: 10, share: 1,
|
||||
trafficTypes: [{transport: "UDP", application: "DNS", bytes: 100}]}
|
||||
trafficTypes: [{transport: "UDP", application: "DNS", bytes: 100}], lastBucketAt: "2026-11-26T18:30:00.000Z"}
|
||||
const edges = ["1", "2"].map(fromId => ({fromId, toId: service.id, bytes: 50, bps: 5, bpsFwd: 5, bpsRev: 0}))
|
||||
assert.equal(scopeMapDestinations([service], edges, [], id => id === "1").services[0]?.trafficTypes, undefined)
|
||||
assert.deepEqual(scopeMapDestinations([service], edges, [], () => true).services[0]?.trafficTypes, service.trafficTypes)
|
||||
const partial = scopeMapDestinations([service], edges, [], id => id === "1").services[0]
|
||||
const complete = scopeMapDestinations([service], edges, [], () => true).services[0]
|
||||
assert.equal(partial?.trafficTypes, undefined)
|
||||
assert.equal(partial?.lastBucketAt, undefined)
|
||||
assert.deepEqual(complete?.trafficTypes, service.trafficTypes)
|
||||
assert.equal(complete?.lastBucketAt, service.lastBucketAt)
|
||||
})
|
||||
@@ -57,9 +57,9 @@ export function scopeMapDestinations(
|
||||
services: services.flatMap(service => {
|
||||
const total = totals.get(service.id)
|
||||
if (!total) return []
|
||||
const { trafficTypes, serviceEvidence, ...destination } = service
|
||||
const { trafficTypes, serviceEvidence, lastBucketAt, ...destination } = service
|
||||
return [{ ...destination, ...total, share: bytes ? total.bytes / bytes : 0,
|
||||
...(total.bytes === service.bytes ? { trafficTypes, serviceEvidence } : {}) }]
|
||||
...(total.bytes === service.bytes ? { trafficTypes, serviceEvidence, lastBucketAt } : {}) }]
|
||||
}).sort((a, b) => b.bytes - a.bytes || a.label.localeCompare(b.label)),
|
||||
edges: visibleEdges,
|
||||
paths: visiblePaths,
|
||||
|
||||
Reference in new issue
Block a user