feat(server,contracts,web): dashboard library counts and engine runs triggeredBy/multi-status filters
- GET /dashboard: automation.library {entities, movies, series, seasons,
episodes, assets} and automation.slotSatisfiedRate; home media overview
shows the counts instead of placeholders.
- GET /engine/runs: `status` accepts comma-separated values; new
`triggeredBy` filter (comma-separated) evaluated server-side by scanning
batches and paging with the last inspected row's cursor (scan cap 2000).
- Task stream: source filter and the "active" tab (running,pending) are now
one paginated server query.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
615917bb45
commit
363f85b1a1
13 files changed
+165
-250
No files matched your search
@@ -322,13 +322,13 @@
|
||||
|
||||
- 页签:全部 / 进行中(进行中 + 排队)/ 失败 / 计划;页签带计数(`/engine/stats`)。
|
||||
- 任务流 = `GET /engine/runs` + `business`:行显示业务标题(`title`,否则类型 + 短 id,否则工作流做什么)、来源(定时 / 事件 / 手动 / Agent;API Key 算手动)、状态、开始与耗时、关联链接。
|
||||
- 筛选写进 URL:`source`、`kind`(businessKind)、`ref`(businessRefId)、`status`、`since`(1h/24h/7d/30d → `from`)、`workflow`(旧引擎链接)。来源筛选在前端对已加载记录做(后端无 triggeredBy 参数)。
|
||||
- 筛选写进 URL:`source`、`kind`(businessKind)、`ref`(businessRefId)、`status`、`since`(1h/24h/7d/30d → `from`)、`workflow`(旧引擎链接)。来源筛选走服务端 `triggeredBy`(手动 = `user,api_key`)。
|
||||
- 详情抽屉 `?run=`:业务摘要 → 时间线(创建、开始、等待、失败步骤、结束)→ 相关审计(`/audit?targetType=engine_run&targetId=`,定时任务另链 `scheduled_job`)→ 折叠的引擎步骤(原引擎面板详情:步骤尝试、信号、输入输出)。操作:未结束可取消,已结束可重跑(重跑后抽屉切到新任务)。`/console/tasks/:id` 是同内容的独立页。
|
||||
- 计划页签 = 原定时任务看板(`components/schedules/schedule-board.tsx`)。卡片"运行记录"跳任务流 `kind=schedule&ref=<key>`;该筛选下页头给出定时任务自己的运行记录(含跳过)与回到卡片的链接;`?job=` 高亮并滚到卡片。
|
||||
|
||||
### 7.4 首页
|
||||
|
||||
正在进行(任务流进行中前 5 + 排队/下载计数)、需要我处理(计数 + 前 3 条)、媒体概览(版本目标满足率、今日产出;作品/季/资产数占位)、计划带(下一次运行的 5 项、启用/失败计数、快速开关)、最近完成/失败、缓存与保留、来源健康(站点 + 账号状态,来自 `/sites?include=accounts`,有问题的排前)、运行状态摘要(`/system/health`)。
|
||||
正在进行(任务流进行中前 5 + 排队/下载计数)、需要我处理(计数 + 前 3 条)、媒体概览(作品/季/资产计数、版本目标满足率、今日产出)、计划带(下一次运行的 5 项、启用/失败计数、快速开关)、最近完成/失败、缓存与保留、来源健康(站点 + 账号状态,来自 `/sites?include=accounts`,有问题的排前)、运行状态摘要(`/system/health`)。
|
||||
|
||||
### 7.5 运行状态页(`/console/status`)
|
||||
|
||||
@@ -336,7 +336,10 @@
|
||||
|
||||
### 7.6 后端缺口
|
||||
|
||||
- `/dashboard` 没有 `library{entities, seasons, assets}`,首页媒体概览三个计数显示"—"(site-center.md §10 已列)。
|
||||
- `/engine/runs` 没有 `triggeredBy` 筛选参数,来源筛选只作用于已加载的记录。
|
||||
- `/engine/runs` 的 `status` 只收单值,"进行中"页签用 running、pending 两次查询各取前 100 条合并,不分页。
|
||||
- 定时任务的运行记录(`scheduled_job_run`)没有对应引擎 run id,卡片与任务之间只能按 `business.kind=schedule` + key 关联;feeds.poll 这类只发事件的定时任务,触发的任务记在 Feed 名下。
|
||||
W10 已补(2026-09-28):
|
||||
|
||||
- `/dashboard` 的 `automation.library{entities, movies, series, seasons, episodes, assets}` 与 `automation.slotSatisfiedRate`,首页媒体概览三个计数与满足率直接取用。
|
||||
- `/engine/runs?triggeredBy=`(单值或逗号多值,服务端逐页推断后筛选,一页可能少于 limit,以 `nextCursor` 为准,单次请求最多扫 2000 行);来源筛选改走服务端。
|
||||
- `/engine/runs?status=running,pending` 多值;"进行中"页签改为一次查询 + 游标分页,不再两次各取 100 条合并。
|
||||
|
||||
仍未补:定时任务的运行记录(`scheduled_job_run`)没有对应引擎 run id,卡片与任务之间只能按 `business.kind=schedule` + key 关联;feeds.poll 这类只发事件的定时任务,触发的任务记在 Feed 名下。
|
||||
Reference in new issue
Block a user