feat(group-export): 本地导出加「移除敏感信息」勾选,默认保真 - #620
Merged
Merged
Conversation
把后端 ES-2 的分流开关接到界面上:FILE 给勾选框、默认不勾(=保真包,能直接 搬到另一个环境用);GIT 不给这个开关——后端强制脱敏,给了就是假开关,只留一句说明。 - ExportGroupInfoBatchParams 加 removeSensitiveData?,三态语义与后端 ExportGroupRequest 对齐 - 未勾选时用告警色显形「包内将含明文凭据」(ADR-0034 接受的代价要求 UI 看得见) - 仅 FILE 分支发送该字段;GIT 分支刻意不发——发 false 会换回一条「你的请求被 覆盖了」的告警,而界面从未给过这个选择 - i18n: en / zh-CN / zh-TW 各加 4 个 key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
后端把分组导出的 secret 处理从「一刀切脱敏」改成按用途分流(配套 PR:tapdata/tapdata#3413):
本地包从此默认含明文凭据,误传/误共享的后果更重 —— 所以这件事必须在导出弹窗上看得见。
改了什么
ExportGroupInfoBatchParams加removeSensitiveData?(三态语义与后端ExportGroupRequest对齐:不传 = 按用途取默认)。GroupExportDialog.vue:勾选框仅 FILE 分支渲染、默认不勾(=保真);未勾选时用告警色 + 图标显形「包内将含明文凭据」。false只会换回一条「你的请求被覆盖了」的告警,而界面从未给过这个选择;那条回告是给显式调 API 的人用的。en/zh-CN/zh-TW各 4 个 key。验证
本仓无测试框架(无 vitest / jest / test-utils),故用三道闸:
vue-tsc新增行零报错(仓库基线本就有 5156 条error TS,根type-check脚本自身是坏的)。并做了变异:把接口字段改名 →GroupExportDialog.vue(287,9) TS2561精确打红 FILE 调用点,证明这道闸有牙。未做:勾选框的浏览器肉眼确认(长什么样、GIT 下是否真的隐藏)—— 需要 review 时顺手看一眼。