Frun1na opened a new issue, #6804: URL: https://github.com/apache/rocketmq-dashboard/issues/6804
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `rocketmq-studio` branch, or I have stated the exact version I am running below. ### Studio Version branch: rocketmq-studio git commit id: a92c23144408cdf5729707050e9ecd9b75f1bad0 deployed as: reproduced by a unit test against that commit ### Runtime Environment not applicable — the defect is in the alert rules table, reproduced with a jsdom unit test ### Connected RocketMQ Cluster not applicable — reproduced with a stubbed rule runtime feed in a unit test ### Describe the Bug The alert rules table's "运行态" column names only two of the five rule runtime states. `AlertStateStatus` (`server/src/main/java/org/apache/rocketmq/studio/ops/alert/AlertStateStatus.java`) is `OK, PENDING, FIRING, RESOLVED, ACKED`, and the runtime feed reports all of them: the state machine writes `RESOLVED` (`AlertStateMachine.java:92`) and `OK` (`:95`), the acknowledge flow stores `ACKED` (read back by `MybatisPlusAlertStateRepository.java:116`), and `toRuntime` (`:144`) explicitly notes that "ACKED and RESOLVED states keep lastNotifiedAt". `web/src/pages/ops/alerts.tsx:749-764` renders `FIRING`/`PENDING` through their localized count labels but falls back to `states[0].status` for anything else, so a rule whose state is `ACKED`, `RESOLVED` or `OK` shows the raw English enum in the Chinese console, next to neighbours that read "触发 2" / "待定 1". ### Steps to Reproduce ``` cd web && npx vitest run src/pages/ops/__tests__/AlertsPage.test.tsx ``` The new case feeds the runtime list three rows with statuses `ACKED`, `RESOLVED` and `OK` and asserts the cells read 已确认 / 已恢复 / 正常. On a92c2314 it fails at the first assertion because the cell still prints `ACKED`. ### What Did You Expect to See? Every rule runtime state named in the viewer's language, like the two that already are. ### What Did You See Instead? Three of the five `AlertStateStatus` values are printed as their raw English enum in a Chinese UI. ### Additional Context A fix with a regression test follows in a pull request. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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]
