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

Показать среднюю скорость и время последней минуты с потоками.
This commit is contained in:
Denozordec committed 2026-11-27 01:40:50 +07:00
1 parent 7cf17c7283
commit 4097e1a6fc
15 files changed
+122 -61

No files matched your search

+9 -2
View File
@@ -22,6 +22,7 @@ const evidenceLabel: Record<FlowServiceBasis, string> = {
catalog: "По каталогу",
network: "По IP / ASN",
port: "По протоколу / порту",
heuristic: "Оценка по сети и порту",
unknown: "Сервис не определён",
}
const percent = new Intl.NumberFormat("ru-RU", {style: "percent", maximumFractionDigits: 1})
@@ -180,7 +181,7 @@ export function ServiceInspector({ service, paths, exits, exitName, country, bas
</header>
<div className="mx-0.5 mb-0.5 min-h-0 overflow-y-auto rounded-lg border">
<InspectorMetrics rows={[
["Скорость", formatNetflowRate({ bps: service.bps }), "Средняя скорость NetFlow за " + windowLabel],
["Средняя скорость IPFIX", formatNetflowRate({ bps: service.bps }), "Сохранённые потоки за " + windowLabel],
[country ? "Доля страны" : "Доля трафика", percent.format(service.share)],
["Объём · " + (currentVolume ? windowLabel : volume?.window ?? "24 ч"), <>{currentVolume ? formatBytes(service.bytes) : volume?.bytes == null ? "—" : formatBytes(volume.bytes)}{volume && <time dateTime={volume.at} title={new Date(volume.at).toLocaleString("ru-RU")} className="block text-[10px] font-normal text-muted-foreground">ответ {new Date(volume.at).toLocaleTimeString("ru-RU")}</time>}</>],
exitIds.length || !exporterIds.length
@@ -197,8 +198,14 @@ export function ServiceInspector({ service, paths, exits, exitName, country, bas
{otherTypeBytes > 0 && <div className="flex justify-between gap-2"><dt>Остальные типы</dt><dd className="font-mono tabular-nums">{typeShare(otherTypeBytes)}</dd></div>}
</dl>
{trafficTypes.some(row => row.application) && <p className="text-muted-foreground">Приложения определены по портам.</p>}
{service.lastBucketAt && <p className="text-muted-foreground">Последняя минута с потоками <time dateTime={service.lastBucketAt} className="font-mono">{new Date(service.lastBucketAt).toLocaleTimeString("ru-RU", {hour: "2-digit", minute: "2-digit"})}</time></p>}
{serviceEvidence.length ? <ul aria-label="Основание классификации" className="flex flex-wrap gap-1">
{serviceEvidence.map(row => <li key={row.basis}><Badge size="sm" variant="secondary">{evidenceLabel[row.basis]}{serviceEvidence.length > 1 && ` · ${typeShare(row.bytes)}`}</Badge></li>)}
{serviceEvidence.map(row => <li key={row.basis}>
<Badge size="sm" variant={row.basis === "heuristic" ? "info-light" : "secondary"}
title={row.basis === "heuristic" ? "Сервис предполагается по сети назначения и порту 443" : undefined}>
{evidenceLabel[row.basis]}{serviceEvidence.length > 1 && ` · ${typeShare(row.bytes)}`}
</Badge>
</li>)}
</ul> : null}
</section>}
<InspectorUsers users={serviceUsers(service, paths)} windowLabel={windowLabel} />