Skip to content

Feat/refactoring UI#65

Merged
isJimTT merged 3 commits into
devfrom
feat/refactoring_ui
Jun 10, 2026
Merged

Feat/refactoring UI#65
isJimTT merged 3 commits into
devfrom
feat/refactoring_ui

Conversation

@isJimTT

@isJimTT isJimTT commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@CLAassistant

CLAassistant commented Jun 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@isJimTT
isJimTT merged commit 04260da into dev Jun 10, 2026
2 checks passed
@isJimTT
isJimTT deleted the feat/refactoring_ui branch June 10, 2026 03:59
zycgit added a commit that referenced this pull request Jul 7, 2026
* Feat/refactoring UI (#65)

* feat: add refactor ui v1

* feat: add agent.md && some feilds opt

* fix(build): fix build error and change design doc、translate comments to English、 prefix token cookie names  (#67)

* fix(build): fix build error

* fix(docs): change design doc

* docs(java): translate comments to English

* docs: translate comments to English

* fix(auth): prefix token cookie names

* fix read config bug (#71)

* fix(config): fix read config bug

* Polish initialization and upgrade wizard UI

* add codeowners (#74)

add codeowners

* 1. Unified camel case naming for front-end and back-end interfaces (#75)

* Feat/UI optimization (#76)

* feat(audit): improve operation audit list and export (#70)

- Restore and consolidate RDP operation audit query APIs.
- Rename operation audit API paths to camelCase.
- Reuse queryUserAllAudit for operation audit filters.
- Return operation audit filter options from one backend entry.
- Show operator name and UID in operation audit lists.
- Add route permission metadata for operation audit.
- Support plugin-based operation audit export formats.
- Support full and limited-row operation audit export.
- Add source IP to operation audit export output.
- Push operation audit export progress over WebSocket.
- Show export filter summary and conversion progress.
- Wire frontend export event handling into the audit page.
- Add operation audit export progress VO and stage enum.
- Add Console-side plugin ConfigService implementation.
- Add Console-side SessionService result reader support.
- Register SessionService and ConfigService during Console plugin loading.
- Extract reusable result-file reader and writer component.
- Reuse the result-file component in Sidecar result reading.
- Mark the Sidecar SessionService implementation as primary.
- Adjust result-file package names and module dependencies.
- Adapt file format converters to the shared result reader service.
- Remove the old CloudCanal operation log frontend API branch.
- Remove frontend handling for the WebSocket license error branch.

* feat: add login page v1

* 1. fix. (#73)

* 1. 3.2.0 version.

* feat: add login page refactor v2

* feat: add index.html pre loading animation

* feat: change grobal message to toast

* feat: add eslint build error fix

---------

Co-authored-by: 赵永春 <zyc@hasor.net>

* feat(init): remove init-time driver download flow (#77)

- Remove the init-time MySQL driver download page, APIs, WebSocket, progress bus, and frontend component.
- Load the main datasource from the bundled mysql-connector-j 8.0.33 jar with isolated classloading.
- Add GlobalConfUtils.getTempData for the runtime driver cache.
- Make ResourceLoader and CgClassLoader closeable to release jar handles.
- Let PluginLoadHelper load by plugin file name and aggregate jars in plugin directories.
- Load the inner-website plugin during init mode and serve favicon resources.
- Fix the init-mode dmGlobalSettings route and public access.
- Fall back to the init page when full startup fails on database initialization.
- Add admin account configuration and apply it to seed and admin update logic.
- Improve the init confirmation page and clean stale public URLs and driver-download messages.

* Feat/UI polish (#83)

* feat: Unified tab style

* feat: polish sysytem page

* feat: add my permission page fix

* feat: add ticket and project rule ui polish

* feat: add sysytem router opt

* feat(ci/cd): optimize ui and remove project (#90)

* docs: add pull request template
* fix: align dmGlobalSettings route
* feat(dm): remove project function and remove
* feat(jdk): support jdk 17
* fix merge bug
* feat(product): change init product status
* feat(product): change router
* feat(cicd): add change flow search placeholder
* feat(cicd): optimize change flow pages
* feat(cicd): optimize change flow pages
* feat(system): split integration provider forms
* fix(ui): polish permission entry and sql header

* feat(integration): interactive SSO & approval pages, OIDC login polish, help URL fixes (#84)

* feat(sso): build interactive SSO provider page with role select

Replace the placeholder /system/sso page with a devops/im-style list +
drawer flow that manages LDAP/AD/OIDC/DingTalk/Feishu/Wechat providers
through the existing rdpUserConfig KV API:

- list rows derived from accountAuthType, with provider icon and key
  identifier (host/clientId/...)
- "Add provider" drawer shows all 6 types, already-enabled ones are
  disabled with a "已启用" badge and tooltip
- delete clears the provider's KV set and removes the type from
  accountAuthType
- "默认角色" field is a Select bound to rdpRoleListRole so users pick
  from existing roles instead of free-text (backend treats *RoleMap as
  a single default role name, not a real mapping)

Drawer footer is absolute-positioned inside .ivu-drawer-body so long
forms scroll without the footer overlapping the last field.

Also:
- UserConfigTable: max-height now tracks viewport so the Preference
  table scrolls instead of being clipped at 600px on short viewports
- vue.config.js: update dev proxy paths to match the camelCase
  endpoints (globalSettings/checkSupplement/signin/loginMfaValid), the
  prior snake_case entries broke local login after the API rename

* chore(frontend): add code-inspector-plugin devDependency

* style(security): wrap long Table tags for readability

* fix(sso): clear password fields when deleting provider

editMode 在编辑保存后未重置,紧接着删除其他 provider 时 persistProvider
会沿用 editMode=true,跳过空密码字段,导致被删 provider 的 *Secret /
*Password / *Sk 在 DB 残留。把"跳过空密码"的判断上移到 handleSave,仅在
编辑场景下从 payload 删除空密码 key;persistProvider 只写它收到的 key,
删除路径传入的空字符串照常清空。

* fix(sso): mark ldapFieldLogin and ldapRoleMap as required

后端 ConfigHelper.checkLdapConfig 和 checkAdConfig 要求 ldapFieldLogin、
ldapRoleMap 非空,但前端 LDAP/AD 字段未标 required。用户按可见 required
填完后点添加,会收到后端事务回滚抛出的 LDAP_CONFIG_ERROR。把两项在
LDAP 和 AD 字段里都标 required,并排到 required 区段,与后端契约对齐。

* feat(sso): make LDAP and AD mutually exclusive in add drawer

LDAP 与 AD 共用同一组 ldap* KV,同时启用两者会互相覆盖对方配置。在
constant.js 给两者各加 conflictsWith,添加抽屉里若一方已启用则把另一方
置灰并通过 tooltip 提示"与已添加的 X 互斥,请先删除后再切换";同步
约束 handleSelectProvider、handleOpenAddDrawer 和 hasUnenabledProvider,
保证初始选项与按钮可用性都跳过被互斥的项。

* fix(sso): null-safe redirectToFailed

OIDC/SSO 回调失败分支传给 redirectToFailed 的 errorMessage 可能是 null
(e.getMessage() 对 NPE 返回 null、loginRes.getErrMsg() 也可能空),导致
URLEncoder.encode 抛二次 NPE,把真正的错误信息吞掉。改用
StringUtils.defaultString 兜底,charset 统一成 StandardCharsets.UTF_8
与同文件 redirectToLogin 一致。

* fix(sso): make OIDC login flow usable end-to-end

- 登录页恢复 provider 切换器:UI 重构时被删,配置了 OIDC 等 SSO 也没有入口
- 补充信息提交时 loginForm.account fallback 到 registerAccount:首次绑定
  回调 URL 里 account/sub 为空,仅 registerAccount 有值,否则后端报
  LOGIN_FAIL_ACCOUNT_MISSING
- SSO 配置:oidcLoginScope 标必填,避免空 scope 被 IdP 以 access_denied 拒绝
- 侧边栏:SSO 入口收口到主账号,子账号本来就无写权限,不再误导

* feat(sso): split provider config into list + dedicated form page

dev 把 IM / Git 改成"列表 + 独立 /create、/:id/edit 页面"的形态,SSO
跟着对齐:

- 路由:新增 /integrations/sso/create 和 /integrations/sso/:type/edit,
  指向新的 views/system/sso/form.vue
- AppContentHeader:补 SSO 的 breadcrumb 映射(SSO / 新增、SSO / 配置)
- index.vue:移除原有 Drawer + 增删改逻辑,作为纯列表,新增/配置改为
  router push 到新页面
- form.vue:照 views/im/form.vue 的样式做整页表单,保留原有业务语义
  (6 provider 卡片选择、LDAP/AD 互斥、已添加禁用、密码留空保留旧值、
  roleSelect、persistProvider);删除按钮内移到编辑页底部
- 修 scope placeholder 撒谎:getPlaceholder 在 field.required 时不再
  展示「默认: X」,避免必填字段反而提示有默认值

* feat(approval): dedicated integration page for approval providers

把钉钉 / 飞书 / 企业微信审批引擎的配置从通用 KV 表单解放出来,做成
独立的列表 + form 页面,对齐之前 IM / Git / SSO 的形态。

- 路由 /integrations/approval(/create|/:type/edit) 指向 views/system/approval/{index,form}.vue
- constant.js 定义 APPROVAL_PROVIDERS:每家 provider 的字段、enableField、primaryField
- 启用标志 *EnableApprovalService 作为 form 里可见的 i-switch 字段,KV 存 'true' / 'false'
  字符串,前端 init / submit 两端各做一次 bool ↔ string 转换
- 飞书/微信的运行时缓存字段 (*TemplateList) 不进 form,由后端 SPI 管理;
  wechatApprovalTemplateLang 作为普通 Input 由用户填实际企微返回的 lang 值
- 列表状态列区分「已启用」/「已配置未启用」;删除按钮内移到 form 底部
- 侧边栏集成组顺序:IM 配置 → Git Ops → 审批引擎 → SSO,与 SSO 一致只对
  主账号可见(后端 upsert 走 RDP_PRI_USER_KV_CONF_W 双保险)
- AppContentHeader 补 breadcrumb 映射(审批引擎 / 新增|配置)
- i18n 新增 nav-shen-pi-yin-qing + approval-* 全套(zh / en 双语)

* feat(approval): inline enable switch in list

审批引擎列表页 status 列把文字状态换成 i-switch,点击直接切启用 / 禁用,
省去必须进配置页才能开关的两步。before-change 返回 upsert Promise,
后端写入成功后再翻 UI;失败则 Switch 不动并 toast 报错。

* fix(approval): switch UI stays in sync; rework enable label

- 列表页 inline Switch 切换后 UI 不刷新:view-ui-plus 的 Switch 在我们的
  beforeChange Promise resolve 之后才内部 toggle,期间若 init() 已把
  :model-value 改成新值,内部 toggle 会按当前值反转回旧值。把 init()
  推迟到下一个宏任务,让 iView 的 toggle 先走完。
- create / edit 表单的 "启用服务" 改名为 "立刻启用" / "Enable immediately"
- enable 字段抽出 2 列 grid 单独成一行,避免被挤到右侧

* style(approval): move enable switch to bottom of form

* style(approval, sso): left-align footer buttons to match IM / Git

去掉 .approval-form-footer__right / .sso-form-footer__right 上的
margin-left: auto。footer 用的是 justify-content: space-between,
新增模式下只有 __right 一个 child 时 flex 默认会让它落在左侧
(IM / Git Ops 的样式就是这样),margin-left: auto 强制把它推到
右边反而和邻居页面不一致。

* feat(integration): wire help URLs across IM / Git / SSO / Approval

文档站的真实路径(用浏览器爬侧边栏对照得到):
- IM: /docs/integrations/devops/devops_im_{dingtalk,feishu,wechat}
- Git: /docs/integrations/devops/devops_cicd_gitee(GitHub 暂无文档)
- SSO: /docs/integrations/sso/sso_{ldap,ad,oidc,dingtalk,feishu,wechat}
- Approval: /docs/integrations/approval/{dingtalk,feishu,wechat}_approval

后端 5 个 SPI 的 getHelpUrl():
- IM 三家:旧的 /docs/devops/provider/* 路径改成新的 /docs/integrations/*
- Gitee:同步改新路径,去掉 #config 锚点(新页面没这个锚点)
- GitHub:旧的 clougence.com/dm-doc/... 域名 + 路径都失效,且 cdmgr.com
  暂无 GitHub 文档,返回 "" 占位;前端 form.vue 加 v-if 守卫,空 URL
  时不渲染链接

前端 IM / Git form.vue 增加 v-if 检查 helpUrl 是否为空,避免渲染死链接。

SSO / Approval form.vue 新增「查看文档」链接:URL 放在各自 constant.js
的 provider 配置里,渲染逻辑与 IM 一致(jumpToHelp 方法 + footer 上方
一行)。

* fix(im): help link should say 配置 webhook not 获取 AccessToken

IM 配置项是 WebHook URL + Secret,不存在 AccessToken。i18n key 改成
已经存在的 ru-he-pei-zhi-webhook = "如何配置webhook"。

* style(sso, approval): help link label includes provider name

「查看文档」太通用,看不出是当前选中 provider 的文档。改成参数化
i18n「如何对接 {0}」/「How to integrate {0}」,{0} 复用 provider 的
labelKey,例如:

- 审批 → 「如何对接 钉钉审批」/ 「如何对接 飞书审批」/ 「如何对接 企业微信审批」
- SSO → 「如何对接 OIDC」/ 「如何对接 LDAP」/ 「如何对接 AD」...

风格与 IM「如何配置webhook」一致(动词 + 具体对象)。

* fix(settings): hide managed integration configs

* fix(integrations): align auth form layout

* feat(audit): add SQL audit log retention setting entry

- SqlLog 新增审计日志保存天数设置入口与弹窗,校验 1-60 整数
- 修复 AppContentHeader 在审计页误隐藏 SQL 工作台入口链接
- managedUserConfigs 纳入 sqlAuditRetentionDays,避免通用配置表重复暴露
- 统一审计日志页头部查询按钮样式,移除冗余刷新按钮

* fix(sso): resolve provider type case mismatch on edit entry

- lowercase provider type in edit URL and match provider case-insensitively
- use canonical provider type in bootstrap selection to fix enabledTypes check
- mark feishu api timeout as required for sso and approval

* Feat/slim front index (#93)

* feat: reduce entry bundle by ~1mb

* feat: add query sql result scroll fix

* feat: add perfermance page scroll fix

* feat: add login page responsive

* feat: add header change transition

* feat(sso): split AD and LDAP into independent SSO config sets (#94)

* fix(sso): disable Add button visually when all providers added

- antdv.less: .ant-btn-primary 用 !important 强推绿底,没排除 :disabled,
  导致 Ant 默认的禁用灰被盖掉。补 :not(:disabled) 守卫,并新增灰化分支
  (对齐 ghost 分支已有的 #ececec / #dadada / #999)。
- sso/index.vue: 用 a-tooltip 包住"新增"按钮,禁用时提示"所有可用的 SSO
  提供者均已添加",启用时 title 为空自动隐藏。
- locales: 新增 sso-all-providers-enabled。

* fix(sso): prevent row jitter when hovering action link

global a:hover 用 border-bottom 加 1px 实线撑高了表格行。SSO 列表的
"配置" 链接局部覆盖:禁掉 border-bottom,改用 inset box-shadow 画下
划线,视觉一致但不占盒模型空间,hover 不再撑高行高。

* fix(approval): prevent row jitter when hovering action link

跟 SSO 列表同样的问题:global a:hover 的 border-bottom 会撑高表格行。
局部覆盖:禁掉 border-bottom,用 inset box-shadow 画下划线,视觉一致
但不占盒模型空间。

* fix(integrations): prevent row jitter when hovering action link

跟 SSO/Approval 同样的问题:global a:hover 的 border-bottom 会撑高表格
行。Git Ops 和 IM 列表局部覆盖:禁掉 border-bottom,用 inset box-shadow
画下划线,视觉一致但不占盒模型空间。

* feat(sso): split AD and LDAP into independent config sets

Separate AD provider configuration from LDAP by introducing dedicated ad*
keys (adHost, adPort, adBase, adUser, adPassword, adDomain, adRoleMap,
adFieldLogin, etc.) so AD and LDAP can be configured and enabled at the
same time.

- Add ConfigHelper.fetchAdConfig / fetchLdapConfig backed by a shared
  buildConfig, drop the LDAP/AD conflict assumption.
- Extend LdapConfigKey with the new ad* keys; AD and LDAP providers each
  read their own key set.
- Register ad* defaults in UserDefinedConfig so fresh installs initialize
  them alongside ldap*.
- Add Flyway migration V202606260001 with SplitAdLdapSsoConfigMigrator:
  for tenants with AD enabled, copy current ldap* values into ad* and
  reset ldap* to defaults when LDAP is no longer enabled.
- Frontend SSO form: switch AD provider's field bindings to ad* keys and
  remove the LDAP<->AD mutual-exclusion UI (conflictsWith).

* refactor(sso): tighten SplitAdLdapSsoConfigMigrator

- Combine two per-uid loadConfigs calls into a single query, splitting the result into ldap source map and ad existence set.

- Replace oldConfigNames/newConfigNames list builders with static Sets for O(1) lookups.

- Hoist prepareStatement out of the resetLdapConfigs loop and drop the dead row mutation.

- Convert ConfigRow to an immutable record and merge defaultFor/toAdConfig into a single forAd factory.

- Drop the redundant order by id, the wildcard imports, and introduce an EMPTY_AUTH_TYPE constant.

* fix(ui): render danger primary button as red

DmButton mapped <Button type="error"> to antd <a-button type="primary" :danger="true">, but .ant-btn-primary's !important background override won the cascade and painted the button in the theme primary color. Add a higher-specificity rule for .ant-btn-primary.ant-btn-dangerous so delete buttons across the integrations forms (SSO, IM, Git Ops, Approval) render in the error color.

* fix(ui): paint destructive confirm OK button red

View UI Plus Modal.confirm did not pass className through to the modal wrap, so a per-call class option was a no-op. Monkey-patch Modal.confirm in main.js to tag the freshly mounted .ivu-modal-wrap with the supplied className, then add a .dm-modal-destructive scoped rule in modal.less that paints the OK button in @error-color (scoped through .ivu-modal-confirm-footer to outweigh the global emerald primary-button override in app-shell.less). Tag the delete confirms in the SSO, approval, IM and Git Ops edit forms with dm-modal-destructive so their confirm matches the delete button color.

* fix(init): keep init server port aligned (#91)

* fix(init): keep init server port aligned

* refactor(init): centralize init server port resolution in InitApplication

Move the duplicated server.port resolution out of both launchers into
InitApplication, which already owns the 8222 default. Removes the
copy-pasted applyInitServerPort helper and the launcher->InitApplication
system-property handoff.

保持原有优先级(-D 覆盖 > 配置文件 > 默认 8222)不变。

* feat: optimize security rule and role management workflows (#96)

* feat: optimize security rule workflow
* feat: optimize role management UI
* feat: optimize auth and management ui
* fix: align integration and cluster list toolbar UI
* fix: translate English locale and hide log params column
* fix: clarify environment console readonly switch

* dataSource Manager & support ssh and proxy(http/soeckt4/socket5) & support ssl (#98)

feat(ds): refactor datasource config and ssh tunnel management

PR: #98
Issues: #92, #78, #36, #35, #23

Refactor the datasource configuration model by moving DataSourceConfig, DataSourceType, ConfigDef, SSL/SSH types, and security metadata from base to plugin-sdk, and use DsConfigSpi to unify plugin-side config definitions, defaults, UI panels, and config conversion.
Rework the datasource create/edit flow with DmDsConfigUiPanelFactory, DmDsConfigUiDataFactory, and reusable frontend form components, supporting dynamic config rendering by GENERAL, OPTIONS, SSH_SSL, ADVANCED, and SHADOW groups.
Add SSH tunnel management, including the dm_ssh_config table, SshConfigController, SshConfigService, the frontend SSH config page, and APIs for passwords, private keys, proxy settings, known_hosts probing, and connection testing.
Consolidate datasource config storage by migrating dm_ds_config_kv_4rdp into dm_ds_config_kv_4dm, moving status, cluster binding, and environment fields into dm_ds, and removing legacy dm_ds_config, dm_ds_blob_resource, and dm_ds_usage structures.
Update datasource plugins to use the new dsconf model, including ConfigI18nKeys, ConfigSpi implementations, default ports, SSL/SSH capability declarations, connection property conversion, and plugin-side i18n resources.
Adapt datasource backend services and APIs, including DmDsController, DmDsService, DmDsConfigService, DmDsWebService, DsSchemaService, Query, Tools, File, and Whitelist flows, to the new datasource configuration model.
Enhance SSL certificate configuration with CA data, client certificates, client keys, file formats, passwords, and certificate input components, and wire the behavior into MySQL, PostgreSQL, Oracle, SQL Server, Redis, and related connection factories.
Adjust permission, security rule, user config, and authentication structures by moving ResultEnum, UserConfigDef, RootUserConfig, and NormalUserConfig, and improving role, security rule, and environment readonly workflows.
Standardize plugin and provider i18n resource paths and key names across DingTalk, Feishu, Gitee, GitHub, LDAP, OIDC, WeChat, and related authentication or approval providers.
Remove legacy RDP/dskvconfig/alert/console constants and utilities, and add shared support such as LocalCacheComponent, CallUtils, UiWebUtil, ConsoleUploadService, and related build dependency fixes.

* fix: fix datasource and SQL parser issues

- Split SQL parser engine from datasource plugins, and migrate SQL analysis, rewrite, split, and security rule implementations for each database
- Update ds-test cases to match the new parser module package structure and test entry points
- Fix datasource config, driver loading, built-in driver packaging, and connection configs for GaussDB, ClickHouse, MaxCompute, DB2, OceanBase, and others
- Fix SQL workbench query loading, datasource tree expansion state, PG catalog initialization, and SQL Server certificate trust config
- Fix permission, role, ticket, approval scheduling, and datasource creator authorization issues
- Improve datasource, ticket, permission application, release flow, empty states, route redirects, and login/auth UI experience
- Add CI/CD workflows, Docker multi-arch packaging, and built-in driver build config
- Update README, contribution guides, documentation assets, and versioned release notes

* fix(build): fix build bug

* fix(build): change build base image

* feat(version): change version

* fix(build): fix build bug

* feat(version): change version to 3.3.0

* feat(version): change version to 3.3.0

* release node and consoleMetadataCache default is true. (#106)

1. add 4.0.0 release node.
2. consoleMetadataCache default is true.
3. use 4.0.0 release node.
4. use 4.0.0 release version.
5. Add the link for the release node

* fix(dameng): remove dameng ds (#108)

* fix(dameng): remove dameng ds

* 1. --parallel --max-workers=4 (#109)

* feat(frontend): polish console UI and auth tree preview (#111)

* feat: polish add datasource page

* feat: add cicd page polish

* feat: ticket ui polish

* feat: add other page ui polish

* feat: add sql page schema & db fix

* fix: auth tree preview expansion state

---------

Co-authored-by: 积木 <1820452084@qq.com>

* fix: resolve query session context bugs

* fix: resolve query session context bugs
* fix(config): change config onlineMaxRecordCount default value to 1000

* fix(plugin): use global SqlEngineSpi registry (#113)

Replace datasource-scoped SqlEngineSpi lookup with PluginManager.findSpi to
resolve SQL engines from the global SPI registry.

Remove DsPluginInfo#findSqlEngine and DsMeta#findSqlEngine, and register all
datasource SQL engine implementations through addGlobalSpi with explicit SPI
type and engine name. This keeps SQL engine registration and lookup consistent
across datasource plugins.

* feat/add version (#114)

* feat: add sql query tab fix

* feat: add sql query page ui polish

* feat: replace readme png

* 1. fix default sql engine null. (#116)

* fix(cd): make release notes optional for non-latest releases (#117)

* fix(cd): require release notes only when publishing latest

Non-latest releases (e.g. prereleases) no longer need a release notes
file. Publish step falls back to a minimal note when the file is absent.

* chore(docker): install vim in runtime images

* feat: add log pagenaiton fix (#118)

---------

Co-authored-by: 积木踢踢 <113582635+isJimTT@users.noreply.github.com>
Co-authored-by: 赵永春 <zyc@hasor.net>
Co-authored-by: Coooolfan <78391548+Coooolfan@users.noreply.github.com>
Co-authored-by: 积木 <1820452084@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants