From c259e2ebe2ab602b4e97a0b89bebde47e4ecd6cf Mon Sep 17 00:00:00 2001 From: liuqiufeng Date: Fri, 31 Jul 2026 22:02:11 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(oracle):=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=20SID=20=E8=BF=9E=E6=8E=A5=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在连接弹窗中切换 Service Name 与 SID,并完善 URI 和参数回显 - 使用 SID 查询参数生成 Oracle DSN,兼容 Navicat 导入及历史配置 - 补充多语言、弹窗滚动布局和前后端回归测试 --- frontend/src/App.css | 19 ++ .../components/ConnectionModal.i18n.test.tsx | 13 + frontend/src/components/ConnectionModal.tsx | 25 +- .../connectionModal/ConnectionModalStep2.tsx | 49 +++- .../connectionModalConfig.oracle.test.ts | 256 ++++++++++++++++++ .../connectionModal/connectionModalConfig.ts | 80 ++++++ .../connectionModalUri.test.ts | 167 ++++++++++++ .../connectionModal/connectionModalUri.ts | 169 ++++++++++-- frontend/src/i18n/i18n.test.ts | 42 +++ frontend/src/i18n/index.ts | 18 ++ internal/app/db_context.go | 2 +- internal/app/navicat_ncx_import.go | 3 + internal/app/navicat_ncx_import_test.go | 3 + internal/db/dsn_test.go | 73 +++++ internal/db/oracle_dsn_test.go | 16 +- internal/db/oracle_impl.go | 52 +++- shared/i18n/de-DE.json | 6 + shared/i18n/en-US.json | 6 + shared/i18n/ja-JP.json | 6 + shared/i18n/messages.ts | 12 + shared/i18n/ru-RU.json | 6 + shared/i18n/zh-CN.json | 6 + shared/i18n/zh-TW.json | 6 + 23 files changed, 996 insertions(+), 39 deletions(-) create mode 100644 frontend/src/components/connectionModal/connectionModalConfig.oracle.test.ts diff --git a/frontend/src/App.css b/frontend/src/App.css index b213b6f3..f765cc50 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -1379,6 +1379,8 @@ body[data-theme='dark'] .gn-connection-type-group:hover:not([aria-pressed='true' } .connection-modal-wrap.connection-modal-form .ant-modal-body { + display: flex; + flex-direction: column; padding-left: 0 !important; padding-right: 0 !important; } @@ -1409,6 +1411,23 @@ body[data-theme='dark'] .gn-connection-type-group:hover:not([aria-pressed='true' max-height: none; } +/* 默认(未拖拽调高)时同样打通高度链:弹窗内容超过 max-height 后由 + gn-conn-form-main(overflow: auto)消费剩余空间滚动,避免展开折叠区 + 或新增字段后表单底部超出弹窗上限被截断、滚动条被压出可视区。 */ +.connection-modal-wrap.connection-modal-form .ant-modal-header { + flex-shrink: 0; +} + +.connection-modal-wrap.connection-modal-form .gn-conn-studio-form, +.connection-modal-wrap.connection-modal-form .gn-conn-form-layout { + display: flex; + flex: 1 1 auto; + flex-direction: column; + width: 100%; + min-height: 0; + max-height: none; +} + /* demo .f-row */ .connection-modal-form .gn-conn-f-row, .gn-conn-dense .gn-conn-f-row { diff --git a/frontend/src/components/ConnectionModal.i18n.test.tsx b/frontend/src/components/ConnectionModal.i18n.test.tsx index 05b0d90a..c8018884 100644 --- a/frontend/src/components/ConnectionModal.i18n.test.tsx +++ b/frontend/src/components/ConnectionModal.i18n.test.tsx @@ -245,6 +245,18 @@ vi.mock("antd", () => { ); Select.Option = ({ children }: any) => {children}; + const Radio = ({ children, value }: any) => ( + + ); + Radio.Group = ({ children, value }: any) => ( +
+ {children} + {value ? radio:{value} : null} +
+ ); const Checkbox = ({ children, checked, onChange }: any) => (