Dockerfile 运行阶段补齐 dws_dingtalk_scan(F12),并新增 runtime-scripts 门禁 做脚本依赖闭包正负例;就绪探测每次解析当前端点/绑定/凭据并区分 404、未配置、 不可达(F13);路由写入来源路径与父目录,历史空值仅按同连接同 item 的意图读时 补齐(F14);目标筛选显示短 ID 与当前绑定/历史并提供快捷筛选(F15);刷新终态 移除后台运行、展示失败时间/旧快照/脱敏原因/作业 ID 与重试(F16)。 验证:make verify 17 项全过(identity 本地按设计 skipped);一次性 schema 的 Monitor 目录/路由集成用例通过;8088 部署与真实 UI 验收仍由父会话执行。
This commit is contained in:
+26
-2
@@ -3,6 +3,8 @@ export interface MonitorTask {
|
||||
id: string
|
||||
title: string
|
||||
path: string
|
||||
node_id: string
|
||||
parent_node_id: string
|
||||
source_id: string
|
||||
source_name: string
|
||||
target_scope: string
|
||||
@@ -23,9 +25,22 @@ export interface MonitorTaskPage {
|
||||
limit: number
|
||||
offset: number
|
||||
sources: { id: string; name: string }[]
|
||||
targets: { id: string; name: string }[]
|
||||
targets: { id: string; name: string; scope?: string }[]
|
||||
bindings: MonitorBindings
|
||||
retryable: number
|
||||
}
|
||||
export interface MonitorBindings {
|
||||
internal: string
|
||||
external: string
|
||||
}
|
||||
export const shortID = (id: string) => (id.length > 8 ? id.slice(0, 8) : id)
|
||||
export const isCurrentTarget = (id: string, scope: string, bindings: MonitorBindings) =>
|
||||
Boolean(id) &&
|
||||
(scope === 'external' ? bindings.external === id : scope === 'internal' ? bindings.internal === id : false)
|
||||
// 同名目标(例如两个“对内知识库”)只靠名称无法区分:名称 + 短 ID,
|
||||
// 并明确当前绑定/历史;完整 ID 留在详情里。
|
||||
export const targetLabel = (name: string, id: string, scope: string, bindings: MonitorBindings) =>
|
||||
`${name || '目标知识库'} · ${shortID(id)}${isCurrentTarget(id, scope, bindings) ? ' · 当前绑定' : ' · 历史'}`
|
||||
export interface MonitorFilters {
|
||||
q: string
|
||||
source: string
|
||||
@@ -102,6 +117,8 @@ export async function fetchMonitorTasks(
|
||||
'id',
|
||||
'title',
|
||||
'path',
|
||||
'node_id',
|
||||
'parent_node_id',
|
||||
'source_id',
|
||||
'source_name',
|
||||
'target_scope',
|
||||
@@ -125,5 +142,12 @@ export async function fetchMonitorTasks(
|
||||
for (const option of [...d.sources, ...d.targets])
|
||||
if (!record(option) || typeof option.id !== 'string' || typeof option.name !== 'string')
|
||||
throw new Error('文件处理筛选项无效')
|
||||
return d as unknown as MonitorTaskPage
|
||||
const bindings = record(d.bindings) ? d.bindings : {}
|
||||
return {
|
||||
...d,
|
||||
bindings: {
|
||||
internal: typeof bindings.internal === 'string' ? bindings.internal : '',
|
||||
external: typeof bindings.external === 'string' ? bindings.external : '',
|
||||
},
|
||||
} as unknown as MonitorTaskPage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user