feat(web): scheduled jobs board (/console/schedules)

- cards grouped by collect / download / organize / maintain / agent checks: switch,
  in-place interval or cron edit, last result and duration, next-run countdown,
  failure reason, run now, skip next, reset to default, history drawer
- top stats (enabled / failed / running / total) and a scheduler-offline notice;
  refreshed by the schedule.changed SSE event with a 30s fallback
- agent check cards show goal template, trigger, budget and allowlist size; create /
  edit dialog (read-only capabilities, budget, trigger, interval, report to inbox)
- nav entry in the system group, route and smoke route

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 02:33:20 +08:00
1 parent a68fcea13b
commit d800987403
11 files changed
+1024 -3

No files matched your search

+3 -3
View File
@@ -2,9 +2,9 @@ import { describe, expect, it } from "vitest";
import { consolePath, findNavItem, NAV_ITEMS } from "./nav.ts";
describe("控制台导航", () => {
it("12 个工作区 + 引擎面板 + 审计,路径唯一且都在 /console 下", () => {
expect(NAV_ITEMS).toHaveLength(15);
expect(new Set(NAV_ITEMS.map((i) => i.to)).size).toBe(15);
it("12 个工作区 + 定时任务 + 引擎面板 + 审计,路径唯一且都在 /console 下", () => {
expect(NAV_ITEMS).toHaveLength(16);
expect(new Set(NAV_ITEMS.map((i) => i.to)).size).toBe(16);
expect(NAV_ITEMS.every((i) => i.to.startsWith("/console"))).toBe(true);
});
+7
View File
@@ -15,6 +15,7 @@ import {
ScrollText,
Settings,
Tags,
Timer,
} from "lucide-react";
export type NavItem = { to: string; label: string; icon: LucideIcon; description: string };
@@ -122,6 +123,12 @@ export const NAV_GROUPS: NavGroup[] = [
icon: Settings,
description: "下载器与媒体服务器实例、路径映射、API Key、Pi 上游与自动化开关",
},
{
to: "/console/schedules",
label: "定时任务",
icon: Timer,
description: "周期任务与 Agent 巡检的开关、间隔、立即执行与历史",
},
{
to: "/console/engine",
label: "工作流引擎",