Frun1na opened a new issue, #6782: URL: https://github.com/apache/rocketmq-dashboard/issues/6782
### 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 audit page's operation vocabulary, reproduced with a jsdom unit test ### Connected RocketMQ Cluster not applicable — reproduced with a stubbed audit read in a unit test ### Describe the Bug The audit page cannot name five operation codes and one resource type that the server writes into `rmq_operation_audit`, so those rows fall back to the English-only title-cased label with the `default` tag colour: 1. `PUSH_ACL_TO_BROKER` — written by the ACL push that shipped with #6693 (`server/src/main/java/org/apache/rocketmq/studio/instance/acl/AclService.java:394`), one row per account and broker. 2. `DELIVER_ALERT_NOTIFICATION`, `RETRY_ALERT_NOTIFICATION`, `FAIL_ALERT_NOTIFICATION`, `RETRY_ALERT_NOTIFICATION_MANUALLY` — written by the notification outbox (`server/src/main/java/org/apache/rocketmq/studio/ops/alert/NotificationOutboxService.java:265`, `:400`, `:580`). 3. The resource type `ALERT_NOTIFICATION` those rows carry (`NotificationOutboxService.java:586`). `auditPresentation.ts` maps 45 operation codes and 17 resource types; none of the six above is among them. On a Chinese-locale deployment every other row of the audit table reads 创建 Topic / 更新集群配置 while these read `Push Acl To Broker` / `Deliver Alert Notification`, and their category is `other`, so they also take the fallback colour and stay out of the category-driven views (`audit.tsx:241` `renderOperationType`, `audit.tsx:461` the operation-type filter options, `renderResourceType`, and the resource-type filter). ### Steps to Reproduce ``` cd web && npx vitest run src/pages/ops/__tests__/auditPresentation.test.ts ``` The new case asserts that each of those codes resolves to a `labelKey` (which is what makes the page render a localized name) and that both language entries exist: ``` Expected: "audit.op.PUSH_ACL_TO_BROKER" Received: undefined ❯ src/pages/ops/__tests__/auditPresentation.test.ts:130:37 ``` In a browser: trigger the ACL push (ACL page → 下发到 Broker) or let one alert notification be delivered, then open the audit page — the new row's operation and resource cells print the English title-cased code. ### What Did You Expect to See? Every operation the dashboard writes is named in both languages on the audit page, as the other 45 codes are. ### What Did You See Instead? Five operation codes and one resource type resolved through the title-cased fallback, which is English-only and uses the `other`/`default` presentation. ### 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]
