iloveeyjafjalla opened a new pull request, #6485: URL: https://github.com/apache/rocketmq-dashboard/pull/6485
Fixes #6484 ### What The audit page answered a failed `listAuditRecords` / `getAuditSummary` with transient toasts only. The summary state stayed `null`, so `AuditSummaryCards` painted its zero fallback - 匹配记录 0, 成功率 0%, 失败 / 部分成功 0 / 0, 操作人数 0, with both bucket lists empty - and `AuditRiskInsights` derived its signals from those zeros. The page also offered no retry: `refreshKey` was only bumped by a completed cleanup. The failure is now state on the page: an `Alert type="error"` with a `common.retry` that re-runs both reads through the existing `refreshKey`, and `AuditSummaryCards` renders `-` (the idiom the session drawer already uses for an unread count, #6113/#6144) instead of fabricating zeros. No new UI text: the banner reuses `common.fetchDataFailed` and the button `common.retry`. Scope note: `AuditRiskInsights` keeps its current input; giving it its own unavailable state would collide with #6131, which rewrites that file for a different reason. ### How did you test this change? - `npx vitest run src/pages/ops/__tests__/AuditSummaryCards.test.tsx src/pages/ops/__tests__/AuditPage.test.tsx`: 17/17 green. - Mutation check: with `audit.tsx` and `AuditSummaryCards.tsx` reverted to `779b8c0e`, the new cases fail - the cards one on "Unable to find an element with the text: -" and the page one on "Unable to find an element with the text: 获取数据失败". - `npx eslint` on the four files: 0 problems; `npx prettier --check`: clean; `npx tsc -b`: clean. ### Checklist - [x] One coherent fix and its tests - [x] Conventional Commit subject - [x] Test names follow the file conventions - [x] New UI text: none - reuses existing i18n keys - [x] Java architecture/integration tests: not run, no backend change - [x] Existing ASF headers retained; no new source file AI assistance: prepared with AI assistance (OpenAI Codex / ZCode); the diff was read and every claim above verified before it was written down. -- 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]
