feat(web): 日志页——任务 / 定时与自动 / 登录 / 审计合一,实时追加与暂停,勾选后问智能体;计划并入「定时任务」页签,侧栏系统组只留日志、运行状态、设置
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
2ce1841628
commit
805ba33ddf
21 files changed
+1693
-846
No files matched your search
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
Bot,
|
||||
CalendarClock,
|
||||
CalendarCog,
|
||||
Compass,
|
||||
Download,
|
||||
FileStack,
|
||||
@@ -11,7 +10,6 @@ import {
|
||||
House,
|
||||
Library,
|
||||
ListChecks,
|
||||
ListTodo,
|
||||
type LucideIcon,
|
||||
ScrollText,
|
||||
Settings,
|
||||
@@ -40,9 +38,10 @@ export function consolePath(...segments: (string | number)[]): string {
|
||||
export const ACQUIRE_GROUP_TITLE = "获取";
|
||||
|
||||
/**
|
||||
* 侧栏 4 组 14 项(IA-2,docs/design/console-ia.md):概览 → 获取 → 整理 → 系统。
|
||||
* 任务归系统;RSS 属于站点(站点详情的 RSS Tab),不再单独占一项。
|
||||
* 侧栏 4 组 13 项(IA-2,docs/design/console-ia.md):概览 → 获取 → 整理 → 系统。
|
||||
* RSS 属于站点(站点详情的 RSS Tab),不再单独占一项。
|
||||
* 没有「待处理」(2026-10-06 取消):问题在发生处处理,铃铛只放等你批准的智能体操作与系统健康;移动端抽屉用同一份表。
|
||||
* 系统组只有三项(界面第二轮):日志(任务、定时与自动、登录、审计合一,定时任务设置是其中一个页签)、运行状态、设置。
|
||||
*/
|
||||
export const NAV_GROUPS: NavGroup[] = [
|
||||
{
|
||||
@@ -54,12 +53,6 @@ export const NAV_GROUPS: NavGroup[] = [
|
||||
icon: House,
|
||||
description: "在忙什么、要我处理什么、最近入库了什么",
|
||||
},
|
||||
{
|
||||
to: "/console/schedules",
|
||||
label: "计划",
|
||||
icon: CalendarCog,
|
||||
description: "智能体巡检与自动任务的开关和间隔",
|
||||
},
|
||||
{
|
||||
to: "/console/agent",
|
||||
label: "智能体会话",
|
||||
@@ -110,10 +103,16 @@ export const NAV_GROUPS: NavGroup[] = [
|
||||
title: "系统",
|
||||
items: [
|
||||
{
|
||||
to: "/console/tasks",
|
||||
label: "任务",
|
||||
icon: ListTodo,
|
||||
description: "最近处理了什么、有没有失败",
|
||||
to: "/console/logs",
|
||||
label: "日志",
|
||||
icon: ScrollText,
|
||||
description: "任务、定时与自动任务、登录与操作留痕,可实时查看",
|
||||
},
|
||||
{
|
||||
to: "/console/status",
|
||||
label: "运行状态",
|
||||
icon: Gauge,
|
||||
description: "服务是否正常、CPU 与内存、磁盘与数据库",
|
||||
},
|
||||
{
|
||||
to: "/console/settings",
|
||||
@@ -121,22 +120,15 @@ export const NAV_GROUPS: NavGroup[] = [
|
||||
icon: Settings,
|
||||
description: "下载器、媒体服务器、媒体库目录、站点账号、模型服务与自动化",
|
||||
},
|
||||
{
|
||||
to: "/console/audit",
|
||||
label: "审计",
|
||||
icon: ScrollText,
|
||||
description: "登录、设置、密钥、任务操作的留痕",
|
||||
},
|
||||
{
|
||||
to: "/console/status",
|
||||
label: "运行状态",
|
||||
icon: Gauge,
|
||||
description: "服务是否正常、磁盘与数据库",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
/** 并进别的导航项的旧页面:按前缀归到对应项(任务详情独立页属于日志) */
|
||||
const NAV_ALIASES: Record<string, string> = {
|
||||
"/console/tasks": "/console/logs",
|
||||
};
|
||||
|
||||
/** 不在侧栏但有页面的路由:顶栏标题用 */
|
||||
const EXTRA_TITLES: Record<string, string> = {
|
||||
"/console/preferences": "偏好标签",
|
||||
@@ -162,6 +154,8 @@ export function settingsPath(section: SettingsSection, anchor?: string): string
|
||||
|
||||
/** 按路径找当前导航项(最长前缀匹配) */
|
||||
export function findNavItem(pathname: string): NavItem | undefined {
|
||||
const alias = Object.entries(NAV_ALIASES).find(([from]) => pathname === from || pathname.startsWith(`${from}/`));
|
||||
if (alias) return NAV_ITEMS.find((i) => i.to === alias[1]);
|
||||
return (
|
||||
NAV_ITEMS.find((i) => i.to === pathname.replace(/\/+$/, "")) ??
|
||||
NAV_ITEMS.filter((i) => i.to !== CONSOLE_BASE && pathname.startsWith(`${i.to}/`)).sort(
|
||||
|
||||
Reference in new issue
Block a user