Repository navigation
Zeta 前端:数据源登记新增 Worker UI「发布链接」单字段 - #269
Merged
todosdev[bot] merged 4 commits intoNov 30, 2026
Merged
Conversation
…b-7396-8978-243f87d3764a
…b-7396-8978-243f87d3764a
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.
Summary
?_token=的完整链接,前端以 wire 字段worker_ui_url原样提交,后端负责拆令牌、存干净地址(worker_url+worker_platform_token),调用仍走 Bearer。worker_ui_url(不是存储形态的worker_url),DTO 布尔为has_worker_ui。Changes
web/src/components/ConnectionStringFields.tsx— Spark 表单新增 Worker UI 单字段(db-worker-url),因链接内嵌令牌,默认按密文遮罩、始终提供显隐切换;占位用https://your-worker-ui.example.com/?_token=…(中英)。web/src/components/DatabaseForm.tsx— 新增workerUrl状态与变更处理,切换引擎时清空,并透传给字段组件。web/src/lib/database-form.ts—ConnectionValues增workerUrl;新增workerUrlTouched;connectionPatch在非空时输出worker_ui_url(trim);无成对校验。web/src/lib/api.ts—createDatabase/updateDatabase的 body 增worker_ui_url?: string。web/src/types.ts—Database/AdminDatabase增has_worker_ui?: boolean(与后端 DTO 对齐,供后续菜单链接消费)。web/src/lib/translations.ts— 中英新增admin_db.worker_url、admin_db.worker_url_placeholder。connectionStringFields.test.tsx、databaseForm.test.ts补 Worker UI 字段渲染、遮罩、workerUrlTouched、connectionPatch的覆盖。Testing
cd web && pnpm test:42 个文件 / 450 个用例全绿(exit 0)cd web && pnpm type-check:exit 0(
web/dist为 gitignore 产物,不随源码提交,部署时由pnpm build:web重建。)