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
@@ -11,6 +11,7 @@ import { JsonView } from "~/components/console/json-view.tsx";
|
||||
import { KvList } from "~/components/console/kv-list.tsx";
|
||||
import { StatusBadge } from "~/components/console/status-badge.tsx";
|
||||
import { Timeline, type TimelineItem } from "~/components/console/timeline.tsx";
|
||||
import { BUSINESS_OBJECT_TYPE, objectLogsPath } from "~/components/logs/labels.ts";
|
||||
import { Button } from "~/components/ui/button.tsx";
|
||||
import { errorMessage } from "~/lib/api.ts";
|
||||
import { formatDuration, formatRelative, spanSec } from "~/lib/labels.ts";
|
||||
@@ -240,13 +241,14 @@ export function TaskDetailBody({ r, onOpenRun }: { r: EngineRunDetail; onOpenRun
|
||||
const link = businessLink(b, r.input);
|
||||
const src = sourceOf(b?.triggeredBy);
|
||||
const hasError = r.error !== null && r.error !== undefined;
|
||||
// 相关日志(日志页按对象筛选):本任务的操作留痕;关联对象的全部日志(任务、定时任务运行、审计)
|
||||
const audits = [
|
||||
{ to: `/console/audit?targetType=engine_run&targetId=${encodeURIComponent(r.id)}`, label: "本任务的操作记录" },
|
||||
...(b?.kind === "schedule"
|
||||
{ to: objectLogsPath("engine_run", r.id), label: "本任务的操作记录" },
|
||||
...(b && BUSINESS_OBJECT_TYPE[b.kind]
|
||||
? [
|
||||
{
|
||||
to: `/console/audit?targetType=scheduled_job&targetId=${encodeURIComponent(b.refId)}`,
|
||||
label: "定时任务的修改记录",
|
||||
to: objectLogsPath(BUSINESS_OBJECT_TYPE[b.kind]!, b.refId),
|
||||
label: b.kind === "schedule" ? "定时任务的全部日志" : "关联对象的全部日志",
|
||||
},
|
||||
]
|
||||
: []),
|
||||
@@ -287,7 +289,7 @@ export function TaskDetailBody({ r, onOpenRun }: { r: EngineRunDetail; onOpenRun
|
||||
<Timeline items={businessTimeline(r)} />
|
||||
</DetailSection>
|
||||
|
||||
<DetailSection title="相关审计">
|
||||
<DetailSection title="相关日志">
|
||||
<ul className="flex flex-wrap gap-x-4 gap-y-1 text-caption">
|
||||
{audits.map((a) => (
|
||||
<li key={a.to}>
|
||||
|
||||
Reference in new issue
Block a user