fix(ui): поднять очередь проблем и уточнить сводку дашборда
This commit is contained in:
1 parent
fe9df167ec
commit
4ec32765df
5 files changed
+245
-190
No files matched your search
@@ -630,11 +630,10 @@ export function useDashboardLive() {
|
||||
const attentionServers: AttentionRow[] = useMemo(() => {
|
||||
return servers
|
||||
.filter((s) => s.enabled && s.status !== "online")
|
||||
.slice(0, 5)
|
||||
.map((s) => ({
|
||||
id: s.id,
|
||||
title: s.name,
|
||||
hint: s.status === "degraded" ? "degraded" : "offline",
|
||||
hint: s.status === "degraded" ? "Ухудшение" : "Не в сети",
|
||||
href: "/servers",
|
||||
tone: s.status === "degraded" ? ("warning" as const) : ("destructive" as const),
|
||||
}))
|
||||
@@ -643,11 +642,10 @@ export function useDashboardLive() {
|
||||
const attentionOverlay: AttentionRow[] = useMemo(() => {
|
||||
return overlay.items
|
||||
.filter((i) => i.status !== "up")
|
||||
.slice(0, 5)
|
||||
.map((i) => ({
|
||||
id: i.id,
|
||||
title: i.name,
|
||||
hint: i.status === "degraded" ? "degraded" : "down",
|
||||
hint: i.status === "degraded" ? "Ухудшение" : "Не работает",
|
||||
href: i.href,
|
||||
tone: i.status === "degraded" ? ("warning" as const) : ("destructive" as const),
|
||||
}))
|
||||
@@ -656,11 +654,10 @@ export function useDashboardLive() {
|
||||
const attentionProbes: AttentionRow[] = useMemo(() => {
|
||||
return enabledProbes
|
||||
.filter((p) => p.status === "down" || p.status === "warn")
|
||||
.slice(0, 5)
|
||||
.map((p) => ({
|
||||
id: p.id,
|
||||
title: p.name,
|
||||
hint: p.status === "warn" ? "warn" : "down",
|
||||
hint: p.status === "warn" ? "Предупреждение" : "Ошибка",
|
||||
href: "/uptime",
|
||||
tone: p.status === "warn" ? ("warning" as const) : ("destructive" as const),
|
||||
}))
|
||||
@@ -714,6 +711,7 @@ export function useDashboardLive() {
|
||||
totalServers: servers.length,
|
||||
probeDown,
|
||||
probeWarn,
|
||||
probeCount: enabledProbes.length,
|
||||
latency,
|
||||
recentEvents,
|
||||
eventsLoading,
|
||||
|
||||
Reference in new issue
Block a user