unbridled-41 opened a new issue, #4282:
URL: https://github.com/apache/rocketmq-dashboard/issues/4282

   ## Problem / Evidence
   
   维护窗口创建弹窗(`web/src/pages/ops/systemAlerts.tsx` 的 
`createSilence`)把**请求构造**(纯客户端校验)与 API 调用放在同一个 `try` 里,唯一 `catch` 只显示通用 toast 
`sysAlerts.silenceCreateFailed`:
   
   - `parseSilenceLabels` 对任何不含 `=` 的片段 `throw new Error(invalidMessage)`,其中 
`invalidMessage` 是专用文案 `sysAlerts.labelsFormatInvalid`("标签格式应为 
key=value,并以逗号分隔")——该 i18n key 在此路径下**永远不可达**;
   - 标签输入含尾逗号(`brokerName=broker-a,`,split 产生空片段)即触发;时区字段仅校验非空, recurring 窗口填 
`GMT+8` 之类非 IANA 时区时 `zonedLocalDateTimeToUtc` 抛出具体 RangeError 同样被吞;
   - 这些异常发生在任何 HTTP 请求之前,axios 拦截器不会代为展示服务端原因,用户只能看到通用"创建失败",没有任何字段指向。
   
   回归测试(先红):`surfaces the label validation message when the silence labels are 
invalid` 在未修复代码上失败(专用消息不出现、只有通用 toast),修复后通过。
   
   ## Impact
   
   运维人员在配置告警静默窗口时被硬性卡死:反复重试同一输入得到完全相同的无指向失败;专用校验消息作为死代码存在。创建静默窗口是告警降噪的核心操作。
   
   ## Expected behavior
   
   客户端校验失败时应显示字段专用错误消息(已存在的 `sysAlerts.labelsFormatInvalid` 等);API 失败仍走通用 
toast(服务端原因由 axios 拦截器展示)。
   
   ## Related work
   
   - #4251(开放,本账号)处理同一弹窗的**表单残留**——取消后旧值影响下次创建,与本缺陷(校验消息不可达)不同面。
   - #4241(开放)实例弹窗隐藏服务端错误原因——同类信息损失缺陷,但服务端原因尚有拦截器兜底;本缺陷无兜底。
   - #4052(开放)维护窗口编辑功能——不触碰创建路径的校验反馈。
   
   ## PR
   
   Fix incoming.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to