Skip to content

feat: strengthen environment tag color display (dms-ui)#841

Merged
LordofAvernus merged 6 commits into
mainfrom
dms-ui/feat-2983
Jun 22, 2026
Merged

feat: strengthen environment tag color display (dms-ui)#841
LordofAvernus merged 6 commits into
mainfrom
dms-ui/feat-2983

Conversation

@LordofAvernus

@LordofAvernus LordofAvernus commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

关联的 issue

https://github.com/actiontech/sqle-ee/issues/2983

描述你的变更

实现环境标签带色展示的前端能力:管理员赋色、SQLE/DMS 选源与列表/筛选统一展示带色标签,降低误选生产库风险。

主要改动

共用组件

  • 新增/增强 EnvironmentTag 组件(带色背景+边框,去掉左侧圆点)
  • 增强 EditableSelect:环境标签编辑支持预设色(10 色)、自定义选色、实时预览、保存后提交
  • 优化 CustomSelect / BasicSelect:ReactNode 标签不重复 icon、下拉宽度自适应避免截断

环境标签管理

  • EnvironmentField:预设色板、四行编辑布局(名称/颜色/预设/预览)、移除前端 V2 二次合并

SQLE 选源(useInstance)

  • 工单、快捷审核、SQL 优化、结构对比、管控配置等 tip 下拉统一展示带色标签

DMS 选源(useDbService)

  • 数据导出等页面直接使用 tips 接口返回的 environment_tag,不再额外请求 V2 合并

列表与筛选

  • 数据源列表「环境属性」列、全局/工单/管控等筛选下拉改为带色标签展示

兼容性

  • 无色标签 → 中性灰;无标签 → 不展示;选 PROD 不阻断
  • CE/EE 构建均覆盖(含 snapshot 与 CE 测试用例更新)

依赖关系

  • 依赖 dms(tips 返回 environment_tag)和 sqle(tip 返回 environment_tag_color)MR 合并后联调验收

确认项(pr提交后操作)

Tip

请在指定复审人之前,确认并完成以下事项,完成后✅


  • 我已完成自测
  • 我已记录完整日志方便进行诊断
  • 我已在关联的issue里补充了实现方案
  • 我已在关联的issue里补充了测试影响面
  • 我已确认了变更的兼容性,如果不兼容则在issue里标记 not_compatible
  • 我已确认了是否要更新文档,如果要更新则在issue里标记 need_update_doc

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 80.97% 29644/36610
🟡 Branches 63.31% 11129/17579
🟢 Functions 84.38% 9977/11824
🟢 Lines 84.94% 28330/33352

Test suite run success

3743 tests passing in 816 suites.

Report generated by 🧪jest coverage report action from 6069324

LordofAvernus and others added 2 commits June 22, 2026 08:16
Expose environment_tag on tips API without frontend merge, unify tag
rendering, expand preset colors, and improve EditableSelect color layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Seechi-Yolo Seechi-Yolo self-requested a review June 22, 2026 08:31
Refresh snapshots for CustomSelect and environment tag UI changes, and
mock user tip list in PushRuleConfiguration to avoid flaky loading state.

Co-authored-by: Cursor <cursoragent@cursor.com>
@LordofAvernus LordofAvernus merged commit 6bc6e32 into main Jun 22, 2026
8 checks passed
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.

1 participant