merge: ui2/v-logs-status
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
commit
ee3ebcb25c
53 files changed
+4100
-934
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import * as logs from "../logs.ts";
|
||||
import { ep } from "./shared.ts";
|
||||
|
||||
// 日志模块(界面第二轮 V 线,docs/runbook/logs.md):业务任务、定时 / 自动任务、登录、审计合成一份列表。仅 admin。
|
||||
export const logsApi = {
|
||||
logs: {
|
||||
list: ep({
|
||||
method: "get",
|
||||
path: "/logs",
|
||||
scope: "admin",
|
||||
summary: "日志列表:任务 / 定时与自动 / 登录 / 审计合并,按时间倒序,游标分页",
|
||||
query: logs.LogQuery,
|
||||
response: logs.LogPage,
|
||||
}),
|
||||
stream: ep({
|
||||
method: "get",
|
||||
path: "/logs/stream",
|
||||
scope: "admin",
|
||||
summary: "日志流(text/event-stream):按同一组筛选推新日志与状态变化,事件名 log.entry",
|
||||
query: logs.LogStreamQuery,
|
||||
response: logs.LogEntry,
|
||||
}),
|
||||
},
|
||||
} as const;
|
||||
@@ -3,6 +3,7 @@ import * as auth from "../auth.ts";
|
||||
import { cursorPage, HealthStatus, IdParam } from "../common.ts";
|
||||
import * as events from "../events.ts";
|
||||
import * as ops from "../ops.ts";
|
||||
import * as resources from "../system-resources.ts";
|
||||
import { EngineRunIdParam, ep, OkResult } from "./shared.ts";
|
||||
|
||||
export const systemApi = {
|
||||
@@ -170,6 +171,14 @@ export const systemApi = {
|
||||
query: ops.SystemHealthHistoryQuery,
|
||||
response: ops.SystemHealthHistory,
|
||||
}),
|
||||
resources: ep({
|
||||
method: "get",
|
||||
path: "/system/resources",
|
||||
scope: "admin",
|
||||
summary: "资源监控:CPU / 内存 / 网络 / 磁盘读写的当前值与最近一段时间的趋势(api 进程内存采样)",
|
||||
query: resources.SystemResourcesQuery,
|
||||
response: resources.SystemResources,
|
||||
}),
|
||||
storage: ep({
|
||||
method: "get",
|
||||
path: "/system/storage",
|
||||
|
||||
Reference in new issue
Block a user