feat(web): storage section on status page (FIX-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2c9e5a1d00
commit
6aaf8c0704
4 files changed
+441
-5
No files matched your search
@@ -22,6 +22,7 @@ import { KvList } from "~/components/console/kv-list.tsx";
|
||||
import { PageHeader } from "~/components/console/page-header.tsx";
|
||||
import { StatusBadge, type StatusTone } from "~/components/console/status-badge.tsx";
|
||||
import { HistoryChart } from "~/components/status/history-chart.tsx";
|
||||
import { StorageSection } from "~/components/status/storage-section.tsx";
|
||||
import { Button } from "~/components/ui/button.tsx";
|
||||
import { Tabs, TabsList, TabsTrigger } from "~/components/ui/tabs.tsx";
|
||||
import { formatDuration, formatRelative } from "~/lib/labels.ts";
|
||||
@@ -30,7 +31,7 @@ import { cn, formatBytes, formatDateTime } from "~/lib/utils.ts";
|
||||
|
||||
export const meta = () => [{ title: "运行状态 · UHD 媒体自动化控制台" }];
|
||||
|
||||
// 运行状态(W9-I):进程心跳、事件循环、SSE、DB、磁盘、挂载根、引擎与定时任务。阈值见 docs/runbook/ops.md。
|
||||
// 运行状态(W9-I):进程心跳、事件循环、SSE、DB、磁盘、挂载根、引擎与定时任务;存储节(FIX-5)见 storage-section.tsx。阈值见 docs/runbook/ops.md。
|
||||
|
||||
const LEVEL: Record<HealthLevel, { label: string; tone: StatusTone }> = {
|
||||
ok: { label: "正常", tone: "success" },
|
||||
@@ -108,6 +109,7 @@ function problems(d: SystemHealth): string[] {
|
||||
if (mounts.length) out.push(`${mounts.length} 个挂载根不可用`);
|
||||
if (d.engine.level === "warn" || d.engine.level === "critical") out.push("任务积压或失败率偏高");
|
||||
if (d.schedules.failing.length) out.push(`${d.schedules.failing.length} 个定时任务上次运行失败`);
|
||||
if (d.storage.level === "warn" || d.storage.level === "critical") out.push("存储用量超过告警线或预算,见「存储」");
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -463,7 +465,7 @@ export default function StatusPage() {
|
||||
<>
|
||||
<PageHeader
|
||||
title="运行状态"
|
||||
description="进程心跳、数据库、磁盘与挂载根。15 秒刷新一次。"
|
||||
description="进程心跳、数据库、磁盘、挂载根与存储。15 秒刷新一次。"
|
||||
actions={
|
||||
<Button
|
||||
variant="outline"
|
||||
@@ -575,6 +577,7 @@ export default function StatusPage() {
|
||||
<Disks d={d} />
|
||||
<Mounts d={d} />
|
||||
</div>
|
||||
<StorageSection health={d} />
|
||||
</div>
|
||||
) : null}
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user