feat: 知识治理平台(含已验证发布/回滚契约)
全栈知识治理平台首次入库(P1-P10 + 发布链路模拟验证闭环): - 治理核心:源目录/变更集/人工审核/发布批次/发布执行(fail-closed 闸口) - 测试通道:WeKnora 测试 KB 上传/轮询/验收;poll 完成时写入 parser_generation/index_generation,修复 manual/seed 路径发布闸口永久拦截 - 发布适配器 v071(本地 source=测试角色 / 云端 target=生产角色 模拟验证通过): * ES 导出/导入 mapping 自适应(.keyword 子字段、可选 tenant_id) * OSS locator 支持嵌套 scheme;chunks.seq_id 由目标序列分配 * bundle 归档同身份重试原子替换;verifier 按 bundle chunk_type 计数 * 回滚 job payload 支持 prior_execution_id(strict 解码) - 三通道发布+回滚演练实测:publish 4/4 verified,检索命中, rollback 4/4 rolled_back,目标端 PG is_enabled=false、ES is_enabled=false - 前端 A·Data-console 风格全站统一,120 用例通过 - 门禁:go vet / go test 全包通过,gofmt 干净
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
.document-workbench { max-width: 1800px; }
|
||||
.document-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
|
||||
.directory-panel, .document-content { min-width: 0; background: white; border: 1px solid var(--border-base); border-radius: 14px; }
|
||||
.directory-panel { padding: 10px; max-height: calc(100vh - 220px); overflow-y: auto; }
|
||||
.directory-panel .folder { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 8px; padding: 11px 10px; background: transparent; color: var(--ink-base); text-align: left; box-shadow: none; }
|
||||
.directory-panel .folder:hover { background: var(--c-run-bg); }
|
||||
.directory-panel .folder.active { background: var(--c-run-bg); color: var(--c-run); }
|
||||
.directory-panel .folder span { overflow-wrap: anywhere; }
|
||||
.directory-panel .folder.child { padding-left: 23px; font-size: 12px; font-weight: 500; }
|
||||
.directory-panel .folder b { flex: 0 0 auto; font-size: 12px; }
|
||||
.directory-note { display: block; padding: 8px 12px; color: var(--ink-mute); font-size: 12px; line-height: 1.6; }
|
||||
.source-unconnected { margin: 8px 0; padding: 12px; border-top: 1px solid var(--bg-soft); color: var(--ink-mute); }
|
||||
.source-unconnected small { display: block; margin-top: 6px; }
|
||||
.test-document-toggle { display: flex; align-items: center; gap: 8px; margin: 12px 8px 4px; padding-top: 12px; border-top: 1px solid var(--border-base); color: var(--ink-mute); font-size: 12px; }
|
||||
.source-progress { margin-bottom: 16px; padding: 16px 18px; border: 1px solid var(--border-base); border-radius: 14px; background: var(--bg-panel); }
|
||||
.section-title { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; color: var(--ink-base); }
|
||||
.section-title span { color: var(--ink-mute); font-size: 12px; }
|
||||
.source-progress-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 10px; }
|
||||
.source-progress-card { display: grid; gap: 6px; padding: 13px 15px; border: 1px solid var(--border-base); border-radius: 10px; background: var(--bg-soft); color: var(--ink-base); text-align: left; box-shadow: none; }
|
||||
.source-progress-card.active { border-color: var(--c-run); background: var(--c-run-bg); }
|
||||
.source-progress-card span { font-weight: 700; }
|
||||
.source-progress-card small { color: var(--ink-mute); }
|
||||
|
||||
.document-counts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 18px; border-bottom: 1px solid var(--border-base); gap: 10px; }
|
||||
.document-counts span { font-size: 12px; color: var(--ink-mute); }
|
||||
.document-counts b { display: block; margin-top: 5px; font-size: 24px; color: var(--ink-strong); }
|
||||
.document-filters { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px 18px; align-items: end; }
|
||||
.document-filters label { display: grid; gap: 6px; font-size: 12px; color: var(--ink-base); }
|
||||
.document-filters label:first-child { flex: 1; min-width: 140px; }
|
||||
.document-filters input, .document-filters select { width: 100%; min-width: 0; border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px; background: white; color: var(--ink-strong); }
|
||||
.scope-editor { margin: 14px 18px 2px; padding: 13px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-soft); }
|
||||
.scope-editor-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
|
||||
.scope-editor-heading > div { display: grid; gap: 3px; }
|
||||
.scope-editor-heading span, .scope-rule-meta, .scope-editor small { color: var(--ink-mute); font-size: 11px; }
|
||||
.inherited-badge { padding: 5px 7px; border-radius: 6px; background: var(--bg-soft); color: var(--ink-mute); font-weight: 650; }
|
||||
.scope-rule-meta { margin: 7px 0 10px; }
|
||||
.scope-editor-fields { display: grid; grid-template-columns: 120px 160px minmax(180px,1fr); gap: 9px; }
|
||||
.scope-editor-fields label { display: grid; gap: 4px; color: var(--ink-base); font-size: 11px; }
|
||||
.scope-editor-fields input, .scope-editor-fields select { min-width: 0; padding: 8px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--bg-panel); }
|
||||
.scope-editor-actions { display: flex; gap: 8px; align-items: center; margin: 10px 0 7px; }
|
||||
.scope-editor-actions button { padding: 8px 12px; }
|
||||
.scope-editor-actions .secondary { background: var(--bg-panel); color: var(--ink-base); border-color: var(--ink-faint); box-shadow: none; }
|
||||
.scope-error, .scope-unavailable { margin: 10px 18px; padding: 10px 12px; border-radius: 8px; background: var(--c-warn-bg); color: var(--c-warn); font-size: 12px; }
|
||||
.document-location { padding: 0 18px 14px; font-size: 13px; font-weight: 650; color: var(--ink-base); }
|
||||
.document-location span { float: right; color: var(--ink-mute); font-weight: 400; }
|
||||
.document-table { table-layout: fixed; width: 100%; }
|
||||
.document-content .table-wrap { max-height: max(300px, calc(100vh - 470px)); overflow: auto; }
|
||||
.document-table thead th { position: sticky; top: 0; z-index: 1; background: var(--bg-soft); }
|
||||
.document-table th:nth-child(1) { width: 37%; }
|
||||
.document-table th:nth-child(2) { width: 16%; }
|
||||
.document-table th:nth-child(3) { width: 19%; }
|
||||
.document-table th:nth-child(4) { width: 10%; }
|
||||
.document-table th:nth-child(5) { width: 18%; }
|
||||
.document-table th, .document-table td { padding: 13px 12px; white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
|
||||
.document-table small { display: block; margin-top: 7px; color: var(--ink-mute); font-size: 11px; }
|
||||
.document-workbench .file-link { padding: 0; border: 0; background: transparent; color: var(--c-run); text-align: left; font-size: 13px; box-shadow: none; white-space: normal; overflow-wrap: anywhere; line-height: 1.55; }
|
||||
.document-workbench .file-link:hover { text-decoration: underline; }
|
||||
.scope-badge, .document-stage { display: inline-block; border-radius: 6px; padding: 5px 7px; font-size: 12px; font-weight: 650; background: var(--border-soft); color: var(--ink-base); }
|
||||
.scope-badge.external { color: var(--c-done); background: var(--c-done-bg); }
|
||||
.scope-badge.internal { color: var(--ink-base); background: var(--c-run-bg); }
|
||||
.document-stage.completed, .document-stage.reused { color: var(--c-done); background: var(--c-done-bg); }
|
||||
.document-stage.blocked, .document-stage.failed { color: var(--c-warn); background: var(--c-warn-bg); }
|
||||
.document-stage.parsing, .document-stage.indexing, .document-stage.uploading, .document-stage.downloading { color: var(--c-run); background: var(--c-run-bg); }
|
||||
.document-inspector { position: fixed; top: 80px; right: 20px; bottom: 20px; z-index: 50; width: min(480px, calc(100vw - 40px)); overflow-y: auto; background: white; border: 2px solid var(--c-run-border); box-shadow: 0 12px 48px #12345240; margin: 0; }
|
||||
.document-inspector h2 { overflow-wrap: anywhere; font-size: 17px; }
|
||||
.inspector-body { padding: 0 22px 20px; font-size: 13px; line-height: 1.7; color: var(--ink-base); }
|
||||
.inspector-body dl { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 8px; }
|
||||
.inspector-body dd { margin: 0; overflow-wrap: anywhere; }
|
||||
.file-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
|
||||
.file-facts span { display: grid; padding: 9px; border-radius: 8px; background: var(--bg-soft); color: var(--ink-mute); font-size: 11px; }
|
||||
.file-facts b { margin-top: 3px; color: var(--ink-base); font-size: 12px; }
|
||||
.document-pipeline { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; margin: 14px 0; }
|
||||
.pipeline-step { display: grid; grid-template-columns: 9px minmax(0,1fr); gap: 6px; align-items: start; padding: 8px 5px; border-radius: 7px; background: var(--bg-soft); }
|
||||
.pipeline-step > span { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--ink-faint); }
|
||||
.pipeline-step div { display: grid; min-width: 0; }
|
||||
.pipeline-step strong { font-size: 10px; color: var(--ink-base); }
|
||||
.pipeline-step small { color: var(--ink-mute); font-size: 9px; overflow-wrap: anywhere; }
|
||||
.pipeline-step.done > span { background: var(--c-done); }
|
||||
.pipeline-step.active > span { background: var(--c-run); }
|
||||
.pipeline-step.problem > span { background: var(--c-warn); }
|
||||
.document-inspector .scope-editor { margin: 16px 0; }
|
||||
.document-workbench button:disabled { cursor: not-allowed; color: var(--ink-faint); background: var(--bg-soft); border-color: var(--border-base); }
|
||||
@media (max-width: 1150px) {
|
||||
.document-layout { grid-template-columns: 205px minmax(0,1fr); }
|
||||
.document-counts { grid-template-columns: repeat(3,minmax(0,1fr)); }
|
||||
.document-table th, .document-table td { padding: 10px 7px; }
|
||||
.scope-editor-fields { grid-template-columns: 1fr 1fr; }
|
||||
.scope-reason { grid-column: 1/-1; }
|
||||
}
|
||||
@media (max-width: 860px) {
|
||||
.document-layout { grid-template-columns: 1fr; }
|
||||
.directory-panel { max-height: 260px; }
|
||||
.document-table { min-width: 650px; }
|
||||
.document-counts { grid-template-columns: repeat(3,minmax(0,1fr)); }
|
||||
.section-title { display: grid; }
|
||||
}
|
||||
Reference in New Issue
Block a user