fix(map): показывать скорость сервисов по короткому окну IPFIX
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 39s
Docker images / netflow-agent-image (push) Successful in 31s
Docker images / backend-image (push) Successful in 15s
Docker images / publish-release (push) Successful in 11s
Docker images / notify-webhook (push) Successful in 2s
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 39s
Docker images / netflow-agent-image (push) Successful in 31s
Docker images / backend-image (push) Successful in 15s
Docker images / publish-release (push) Successful in 11s
Docker images / notify-webhook (push) Successful in 2s
This commit is contained in:
1 parent
ed7b1e0350
commit
c44bcd8f59
14 files changed
+261
-120
No files matched your search
@@ -53,12 +53,15 @@ export function scopeMapDestinations(
|
||||
bytes += unassigned
|
||||
totals.set(service.id, total)
|
||||
}
|
||||
const shareOfVisible = Boolean(userId) || services.some(service => (totals.get(service.id)?.bytes ?? 0) !== service.bytes)
|
||||
return {
|
||||
shareOfVisible,
|
||||
services: services.flatMap(service => {
|
||||
const total = totals.get(service.id)
|
||||
if (!total) return []
|
||||
const { trafficTypes, serviceEvidence, lastBucketAt, ...destination } = service
|
||||
return [{ ...destination, ...total, share: bytes ? total.bytes / bytes : 0,
|
||||
const visibleShare = bytes ? total.bytes / bytes : 0
|
||||
return [{ ...destination, ...total, share: shareOfVisible ? visibleShare : service.share,
|
||||
...(total.bytes === service.bytes ? { trafficTypes, serviceEvidence, lastBucketAt } : {}) }]
|
||||
}).sort((a, b) => b.bytes - a.bytes || a.label.localeCompare(b.label)),
|
||||
edges: visibleEdges,
|
||||
|
||||
Reference in new issue
Block a user