tju-yxq opened a new pull request, #5536:
URL: https://github.com/apache/rocketmq-dashboard/pull/5536

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5535
   
   ### Brief Description
   
   Stops presenting page-local counts as result-set-wide numbers, following the 
`本页` / `on this page` idiom the alert-rules page already established:
   
   - **acl.tsx**: the header subtitle now uses the server totals (`ruleTotal` / 
`userTotal`) that the paginated tables below it already display, instead of the 
current page's array lengths.
   - **systemAlerts.tsx**: the header subtitle is scoped to the page (`本页 {n} 
条未确认` / `{n} unacknowledged on this page`), since the unacknowledged count is 
computed from the loaded page and the page API offers no global figure.
   - **systemAlerts.tsx**: the per-level Badge counts on the level-filter 
buttons are removed — they counted the current page while the buttons trigger 
server-side filters across all pages, so the badge disagreed with the filtered 
result.
   
   ### How Did You Test This Change?
   
   ```
   cd web && npx vitest run src/pages/ops/__tests__/SystemAlertsPage.test.tsx
    Tests  18 passed (18)
   
   cd web && npx vitest run src/pages/instance/__tests__/AclPage.test.tsx
    Tests  26 passed (26)
   
   cd web && npx eslint src/pages/ops/systemAlerts.tsx 
src/pages/instance/acl.tsx src/i18n/translations.ts
    0 errors (1 pre-existing warning)
   
   cd web && npx tsc --noEmit
   (no output — exit 0)
   ```
   
   One test query was updated with the badge removal: the level-filter button's 
accessible name changes from `严重3` (label + page-local badge) to `严 重` (antd 
inserts a space between exactly two CJK characters), so the 
case-insensitive-level test now matches `/严\s*重/`.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in (one 
concern — page-local counts presented as global — across the two affected pages)
   - [x] Commit subject follows Conventional Commits
   - [ ] Tests added or updated for non-trivial changes, test methods named 
`...Test` (counter-source correction; the existing AclPage and SystemAlertsPage 
suites cover the rendering)
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(one key's wording updated in both languages)
   - [x] Architecture constraints stay green (no Java changes)
   - [x] New source files carry the ASF license header (no new source files)
   - [ ] Documentation touched where behaviour changed (counter display only)
   


-- 
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