fix(ui): проверять каталоги дашборда и сохранять неизвестный статус серверов

This commit is contained in:
Denozordec committed 2026-10-03 23:20:37 +07:00
1 parent 9e0f695684
commit 8f65d1620d
8 files changed
+63 -41

No files matched your search

+4 -4
View File
@@ -70,7 +70,7 @@ function AttentionRows({ rows }: { rows: AttentionRow[] }) {
export default function DashboardPage() {
const dash = useDashboardLive()
const offline = Math.max(0, dash.totalServers - dash.onlineCount)
const offline = dash.offlineCount
const health = dash.probeDown + dash.probeWarn
return (
@@ -91,15 +91,15 @@ export default function DashboardPage() {
value: dash.availability.servers ? `${dash.onlineCount} / ${dash.totalServers}` : "—",
hint: !dash.availability.servers ? "нет данных" : !dash.isLive
? "демо"
: offline > 0
? `${offline} не в сети`
: offline > 0 || dash.unknownServerCount > 0 || dash.degradedServerCount > 0
? [offline > 0 ? `${offline} не в сети` : null,dash.unknownServerCount > 0 ? `Статус неизвестен: ${dash.unknownServerCount}` : null,dash.degradedServerCount > 0 ? `Ухудшение: ${dash.degradedServerCount}` : null].filter(Boolean).join(" · ")
: dash.totalServers > 0
? "все в сети"
: "нет серверов",
href: "/servers",
icon: <ServerIcon />,
iconClassName: "text-muted-foreground",
variant: offline > 0 ? "warning" : "default",
variant: offline > 0 || dash.unknownServerCount > 0 || dash.degradedServerCount > 0 ? "warning" : "default",
},
{
id: "overlay",