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:
@@ -1,5 +1,5 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { fetchMonitorTasks } from './monitorTasks'
|
||||
import { fetchMonitorTasks, isCurrentTarget, targetLabel } from './monitorTasks'
|
||||
import { healthLabel } from './WeKnoraMonitor'
|
||||
import type { ServiceHealth } from './monitor'
|
||||
afterEach(() => vi.unstubAllGlobals())
|
||||
@@ -44,3 +44,19 @@ describe('monitor table contract', () => {
|
||||
expect(healthLabel({ ...s, readiness: 'blocked' })).toBe('阻断')
|
||||
})
|
||||
})
|
||||
|
||||
describe('target identity labels (F15)', () => {
|
||||
const bindings = { internal: '0c84a098-d3ed-4b82-a165-e6de9691d6a8', external: 'ext-11112222-3333' }
|
||||
it('distinguishes same-named knowledge bases by short id and binding state', () => {
|
||||
const current = targetLabel('对内知识库', bindings.internal, 'internal', bindings)
|
||||
const historical = targetLabel('对内知识库', 'sc-ed1f812c4e5fabe817fc6351104938c4', 'internal', bindings)
|
||||
expect(current).toContain('0c84a098')
|
||||
expect(current).toContain('当前绑定')
|
||||
expect(historical).toContain('sc-ed1f8')
|
||||
expect(historical).toContain('历史')
|
||||
expect(current).not.toBe(historical)
|
||||
})
|
||||
it('never treats an env/unknown target as the current binding', () => {
|
||||
expect(isCurrentTarget('1b52c140-2e18-4676-afc5-4c7d8d190a8c', 'internal', bindings)).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user