diff --git a/app/(main)/network-map/page.tsx b/app/(main)/network-map/page.tsx index b0bb32d1..d0c5c92d 100644 --- a/app/(main)/network-map/page.tsx +++ b/app/(main)/network-map/page.tsx @@ -2217,15 +2217,6 @@ function NetworkMapContent() { {dataError}. {hasSnapshot ? "Последний полный снимок; актуальность не подтверждена." : "Первоначальная загрузка карты не подтверждена."} )} - - {useLiveData && !hasSnapshot ? "—" : mapServers.filter(s => s.status === "online").length} онлайн - - - {useLiveData && !hasSnapshot ? "—" : mapServers.filter(s => s.status === "degraded").length} с проблемами - - - {useLiveData && !hasSnapshot ? "—" : mapServers.filter(s => s.status === "offline").length} оффлайн - {useLiveData && !hasSnapshot ? "—" : mapServers.filter(s => s.status === "unknown").length} неизвестно {greEdges.length} diff --git a/app/(main)/traffic/page.tsx b/app/(main)/traffic/page.tsx index f3832923..9a16732e 100644 --- a/app/(main)/traffic/page.tsx +++ b/app/(main)/traffic/page.tsx @@ -343,17 +343,6 @@ type SortDir = "asc" | "desc" // ─── shared sub-components ──────────────────────────────────────────────────── -function StatChip({ icon, label, value }: { icon: ReactNode; label: string; value: string }) { - return ( -
-
{icon}
-
-

{label}

-

{value}

-
-
- ) -} // ─── left-panel entity cards ────────────────────────────────────────────────── @@ -489,12 +478,12 @@ function IfaceRow({ c, showServer = false }: { c: BoundIfaceTraffic; showServer? {boundIfaceLabel(c)} {IFACE_TYPE_LABEL[c.interfaceType]} {showServer && ( - + {c.serverSite} )} -

{c.comment || c.userLogin}

+

{c.comment || c.userLogin}

@@ -504,12 +493,12 @@ function IfaceRow({ c, showServer = false }: { c: BoundIfaceTraffic; showServer? {fmtRate(c.txNow)}
-
+

{fmtGiB(c.rxTotal)}

{fmtGiB(c.txTotal)}

{c.status === "online" ? "Работает" : c.status === "unknown" ? "Нет данных" : "Неактивен"} @@ -706,7 +695,7 @@ function UserDetail({ sel, range, setRange }: { sel: UserTraffic; range: Range;
-

{sel.login}

+

{sel.login}

{sel.displayName} · {sel.role}

@@ -715,12 +704,15 @@ function UserDetail({ sel, range, setRange }: { sel: UserTraffic; range: Range; ) : ( <> -
- } label="RX" value={fmtRate(sel.rxNow)} /> - } label="TX" value={fmtRate(sel.txNow)} /> - } label="Пик RX" value={fmtRate(sel.rxPeak)} /> - } label="Интерфейсы" value={`${sel.interfaces.length}`} /> -
+

@@ -742,7 +734,7 @@ function IfaceDetail({ sel, range, setRange }: { sel: BoundIfaceTraffic; range:
-

{boundIfaceLabel(sel)}

+

{boundIfaceLabel(sel)}

{sel.comment || sel.userLogin}

{IFACE_TYPE_LABEL[sel.interfaceType]} @@ -751,12 +743,15 @@ function IfaceDetail({ sel, range, setRange }: { sel: BoundIfaceTraffic; range:
-
- } label="RX" value={fmtRate(sel.rxNow)} /> - } label="TX" value={fmtRate(sel.txNow)} /> - } label="Пик RX" value={fmtRate(sel.rxPeak)} /> - } label="Пик TX" value={fmtRate(sel.txPeak)} /> -
+
@@ -1356,7 +1351,7 @@ export default function TrafficPage() { aria-pressed={flowScope === "servers"} onClick={() => { setFlowScope("servers"); setFlowIface("__all__") }} className={cn( - "text-[10px] px-2 py-0.5 rounded border transition-colors", + "text-xs px-2 py-0.5 rounded border transition-colors", flowScope === "servers" ? "border-primary bg-primary/10 text-primary font-medium" : "border-border text-muted-foreground hover:text-foreground", @@ -1369,7 +1364,7 @@ export default function TrafficPage() { aria-pressed={flowScope === "users"} onClick={() => { setFlowScope("users"); setFlowIface("__all__"); if (range === "30d") setRange("1h") }} className={cn( - "text-[10px] px-2 py-0.5 rounded border transition-colors", + "text-xs px-2 py-0.5 rounded border transition-colors", flowScope === "users" ? "border-primary bg-primary/10 text-primary font-medium" : "border-border text-muted-foreground hover:text-foreground", @@ -1389,14 +1384,14 @@ export default function TrafficPage() { />
- Сортировка: + Сортировка: {visibleSortFields.map(({ field, label }) => ( ) })} - {detailBusy && Загрузка...} + {detailBusy && Загрузка...}
)} diff --git a/components/network-map/map-kpi-strip.tsx b/components/network-map/map-kpi-strip.tsx index 3fd346eb..931272d8 100644 --- a/components/network-map/map-kpi-strip.tsx +++ b/components/network-map/map-kpi-strip.tsx @@ -69,7 +69,7 @@ export function MapKpiStrip({ servers, tunnels, netflowBytes, windowSec, filter, className={cn("text-muted-foreground hover:bg-muted/70 inline-flex h-[26px] items-center gap-1.5 rounded-md border border-transparent px-1.5 text-[12.5px] transition-colors", filter === s.key && "bg-muted border-border text-foreground")} >

- + {card.country !== "UN" ? : null} {card.site}
-
+
{fmtRate(card.rxNow)}
-
+
{fmtRate(card.txNow)}
-
+
{card.sessions}
@@ -265,7 +265,7 @@ function FlowPathsGrid({ cell: ({ row }) => ( {row.original.dst} - + {[row.original.category, row.original.service].filter(Boolean).join(" · ")} @@ -445,12 +445,12 @@ export function FlowAnalyticsDetail({ {analytics?.ifaces && analytics.ifaces.length > 0 ? (
- Интерфейс: + Интерфейс:
-

по iface, без дедупа

+

по iface, без дедупа

) : null} diff --git a/docs/ux-ui/screens/dashboard-observed-ping-1440.png b/docs/ux-ui/screens/dashboard-observed-ping-1440.png index 60e60805..8dc64a49 100644 Binary files a/docs/ux-ui/screens/dashboard-observed-ping-1440.png and b/docs/ux-ui/screens/dashboard-observed-ping-1440.png differ diff --git a/docs/ux-ui/screens/network-map-detail-desktop.png b/docs/ux-ui/screens/network-map-detail-desktop.png index 7352af3e..2468a8ff 100644 Binary files a/docs/ux-ui/screens/network-map-detail-desktop.png and b/docs/ux-ui/screens/network-map-detail-desktop.png differ diff --git a/docs/ux-ui/screens/network-map-detail-mobile.png b/docs/ux-ui/screens/network-map-detail-mobile.png index 9c05c536..53f4a63c 100644 Binary files a/docs/ux-ui/screens/network-map-detail-mobile.png and b/docs/ux-ui/screens/network-map-detail-mobile.png differ diff --git a/docs/ux-ui/screens/network-map-detail-narrow.png b/docs/ux-ui/screens/network-map-detail-narrow.png index d62adcc1..f1136667 100644 Binary files a/docs/ux-ui/screens/network-map-detail-narrow.png and b/docs/ux-ui/screens/network-map-detail-narrow.png differ diff --git a/docs/ux-ui/screens/network-map-overview-desktop.png b/docs/ux-ui/screens/network-map-overview-desktop.png index 48b33d42..172e2ae5 100644 Binary files a/docs/ux-ui/screens/network-map-overview-desktop.png and b/docs/ux-ui/screens/network-map-overview-desktop.png differ diff --git a/docs/ux-ui/screens/network-map-overview-mobile.png b/docs/ux-ui/screens/network-map-overview-mobile.png index d7588874..f065d44f 100644 Binary files a/docs/ux-ui/screens/network-map-overview-mobile.png and b/docs/ux-ui/screens/network-map-overview-mobile.png differ diff --git a/docs/ux-ui/screens/network-map-overview-narrow.png b/docs/ux-ui/screens/network-map-overview-narrow.png index 2e68b95e..8f08cf9c 100644 Binary files a/docs/ux-ui/screens/network-map-overview-narrow.png and b/docs/ux-ui/screens/network-map-overview-narrow.png differ diff --git a/docs/ux-ui/screens/traffic-history-error-1440-2026-10-12.png b/docs/ux-ui/screens/traffic-history-error-1440-2026-10-12.png index 72ad0112..61f4995e 100644 Binary files a/docs/ux-ui/screens/traffic-history-error-1440-2026-10-12.png and b/docs/ux-ui/screens/traffic-history-error-1440-2026-10-12.png differ diff --git a/docs/ux-ui/screens/traffic-live-error-1440-2026-10-12.png b/docs/ux-ui/screens/traffic-live-error-1440-2026-10-12.png index 5b02559d..7afa27fc 100644 Binary files a/docs/ux-ui/screens/traffic-live-error-1440-2026-10-12.png and b/docs/ux-ui/screens/traffic-live-error-1440-2026-10-12.png differ diff --git a/docs/ux-ui/screens/traffic-live-error-320-2026-10-12.png b/docs/ux-ui/screens/traffic-live-error-320-2026-10-12.png index 62631f08..0434ee50 100644 Binary files a/docs/ux-ui/screens/traffic-live-error-320-2026-10-12.png and b/docs/ux-ui/screens/traffic-live-error-320-2026-10-12.png differ diff --git a/docs/ux-ui/screens/wide-statistics-pivot-1440.png b/docs/ux-ui/screens/wide-statistics-pivot-1440.png index 12fc0f47..7d85ab53 100644 Binary files a/docs/ux-ui/screens/wide-statistics-pivot-1440.png and b/docs/ux-ui/screens/wide-statistics-pivot-1440.png differ diff --git a/docs/ux-ui/screens/wide-statistics-pivot-320.png b/docs/ux-ui/screens/wide-statistics-pivot-320.png index 4bd762db..9b4c7f5f 100644 Binary files a/docs/ux-ui/screens/wide-statistics-pivot-320.png and b/docs/ux-ui/screens/wide-statistics-pivot-320.png differ diff --git a/tests/e2e/dashboard-data.spec.ts b/tests/e2e/dashboard-data.spec.ts index e9621bf6..5cbd8060 100644 --- a/tests/e2e/dashboard-data.spec.ts +++ b/tests/e2e/dashboard-data.spec.ts @@ -75,6 +75,9 @@ test("Дашборд: первоначальная ошибка не подме const control = await setup(page, true) await expect(refresh(page)).toBeEnabled() await expect(page.getByText("Не все источники доступны.", { exact: true })).toBeVisible() + await page.getByRole("button", { name: "Объяснить", exact: true }).click() + await expect(page.getByRole("tab", { name: /^Источники и время получения/ })).toHaveAttribute("aria-selected", "true") + await expect(page.getByText("Не обновлены источники: 9", { exact: true })).toBeVisible() await expect(page.getByRole("link").filter({ hasText: "Серверы онлайн" })).toContainText("—") await expect(bgp(page)).toContainText("—") await expect(page.getByText("Серверы без проблем", { exact: true })).toHaveCount(0) diff --git a/tests/e2e/network-map-data.spec.ts b/tests/e2e/network-map-data.spec.ts index c09f67af..cd0ff15e 100644 --- a/tests/e2e/network-map-data.spec.ts +++ b/tests/e2e/network-map-data.spec.ts @@ -40,7 +40,7 @@ test("Карта: неизвестный статус не становится await page.route("**/api/**",r=>{const p=new URL(r.request().url()).pathname;const data=body(p);return r.fulfill({json:p===paths.servers?[{...(data as object[])[0],status:null}]:data})}) await page.goto("/network-map") await expect(page.getByText("1 неизвестно",{exact:true})).toBeVisible() - await expect(page.getByText("0 оффлайн",{exact:true})).toBeVisible() + await expect(page.getByRole("button",{name:"Оффлайн 0",exact:true})).toBeVisible() await page.getByRole("group",{name:"Интерактивная карта сети"}).getByText("Роутер",{exact:true}).click() await expect(page.getByRole("complementary", {name:"Детали объекта карты"}).getByText("Неизвестно", {exact:true}).first()).toBeVisible() await page.getByRole("button",{name:"Неизвестно",exact:true}).click()