Repository navigation
feat(TAP-13018): audit log enhancement (web) - #665
Conversation
…tial reveal - /operation-audit becomes the Audit Logs page: table with time, event type, operator, source, source IP, action, object and outcome (text + status), filters for all audit query conditions, logical-operation rows, detail drawer with required fields, timeline, batch results, change details and secret notes; CSV export gated by v2_audit_log_export; time zone shown. - Structured rendering never shows null/undefined or unresolved placeholders; legacy records show an explicit "unavailable (legacy record)" value. - System settings validate the audit log retention (30-3650 days) and confirm before shortening it. - Role permission tree adds the export audit logs button permission. - Access code and API client secret are masked and copied through the audit reveal endpoints. - Pure page logic in views/audit/audit-log.ts with node --test coverage; three locale texts generated from the backend audit catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- F-01: the role page enables the audit page node v2_audit_log_list (export
button attached there), matching the module permission point checked by
the audit API.
- F-03: router guard returns after redirecting to the dashboard when access
is denied, instead of issuing a second next(false) that left a blank page.
- F-04: legacy records are rendered by the existing operation component, so
placeholders such as {user}/{parameter1} are replaced.
- F-05: retention input is a plain number field with an explicit range hint,
so out-of-range values are reported instead of being silently clamped.
- F-06: change field names are shown with the setting labels.
- New unit test for the change field label mapping.
Co-Authored-By: Claude Code <noreply@anthropic.com>
…F-06) - F-05: the Options API template cannot read the module-scope RETENTION_KEY import, so the retention branch never matched and the control stayed an el-input-number that silently clamped out-of-range values. The check now goes through a method, so the plain number field with the 30-3650 hint is actually rendered and out-of-range input is reported. - F-06: change details use the readable label provided by the backend instead of guessing an i18n key from the internal field name. Co-Authored-By: Claude Code <noreply@anthropic.com>
…05 registry) - Remove the TypeScript annotation from the plain JS <script> of Setting.vue (the previous commit broke the whole settings page); add scripts/check-vue-sfc.mjs and run it in lint-staged so SFC syntax errors are caught before commit. - Change details translate the backend key_label with the settings i18n convention (case preserved) and fall back to the label, then the field. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
- F-11:详情「结果」与列表一致,取操作聚合结果,不再停留在请求阶段的「已受理」 - F-10:服务节点补充 instance,同主机多实例可区分;拼接逻辑抽到 nodeText 便于测试 - 新增 nodeText 单测 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feynmx
left a comment
There was a problem hiding this comment.
审查意见:以下问题会影响审计权限、敏感凭据保护和记录追溯,请修复后再合并。
Align role permissions with the TM authorization check, preserve operator identities, ignore stale detail responses, and use the configured API client for exports. Tested: Audit logic tests, Vue SFC compilation, ESLint and Prettier Not-tested: Deployment under a non-root base URL and role permissions in a running environment Not-tested: Credential exposure in ordinary backend responses remains unresolved
Use audited reveal operations for copying and API debugging; preserve existing credentials when an edit does not supply a replacement. Constraint: Requires the companion TM credential-response changes. Tested: Vue SFC compilation and audit logic tests; lint diagnostics match the pre-existing baseline. Not-tested: Running browser flow and external API client compatibility.
|
审查问题已在前端提交
验证:审计逻辑测试 11 项通过;Vue SFC 编译、格式、多语言检查及 daas 生产构建通过;当前提交的 GitHub 3 项检查通过。daas 类型检查仍有 4439 条既有错误,与合并前逐条一致,未新增。 配套依赖: 主仓普通接口的凭据脱敏和用户访问码 reveal 接口目前仅在本地候选 |
Handle unwrapped JSON responses, Blob responses, and Axios-style errors while retaining the original error when the body is not JSON. Tested: audit export error and audit log tests; targeted ESLint and Prettier
|
配套主仓 PR:tapdata/tapdata#3599,当前为 Draft,提交 该 PR 为访问码和客户端密钥两条 P1 提供后端配套:普通查询不返回明文,显式 reveal 受权限控制并记录审计;客户端返回 其他 review 中,查看权限码、操作人 ID、详情切换竞态和导出 base URL 的线程已关闭;导出错误解析已兼容直接对象、JSON Blob 和 AxiosError,代码及测试已提交,线程待 reviewer 复核。当前前端定向测试 15 项通过,3 项 CI 检查通过;前后端浏览器联调和非根路径部署实测尚未执行,前端类型检查仍有既存诊断。 |
Tested: Audit logic and export tests; targeted ESLint; full type check still has existing errors
概要
TAP-13018 TapData 审计日志增强——前端。
/operation-audit升级为「审计日志」:发生时间、事件类型、操作人、来源、来源 IP、操作、对象、结果(文字+状态)列;全部审计查询条件;异步操作聚合为一行;详情抽屉含必填字段、时间线、批量对象结果、变更详情与脱敏说明;显示时区;导出 CSV 按钮受v2_audit_log_export控制。配套主仓 PR: tapdata/tapdata#3599(待审,尚未合并)。普通响应隐藏访问码与客户端密钥,显式 reveal 受权限控制并记录审计;客户端返回
clientSecretConfigured,编辑其他字段保留原密钥。凭据相关 P1 需待配套合入、完整联调和 reviewer 复核,不应独立部署本 PR。Review 核对
测试总结(候选 6e5b1e8)
本地浏览器已验证普通用户和客户端查询不返回凭据明文、显式读取产生审计、编辑客户端后原密钥保留、审计列表和详情以及导出;运行环境的构建产物 SHA 尚未独立核实,不能作为本提交完整联调通过的依据。
待验收
AgenticOps 版本 main-v1.6-23-6a2a279b
🤖 Generated with Claude Code