iloveeyjafjalla opened a new pull request, #6409: URL: https://github.com/apache/rocketmq-dashboard/pull/6409
Fixes #6408 ### What `web/src/pages/cluster/certs.tsx` answered a failed `listK8sCerts()` with a transient toast only: the rows stayed empty, and once the toast faded the page rendered the header `共 0 个证书`, the table's empty state and no error or retry - so an operator auditing certificate expiry read a failed read as "this deployment has no certificates". The load also ran once per mount, so the only recovery was a full page reload. The failure is now state on the page: the previous rows are kept, the header reports the count as `不可用` instead of a measured zero, and an `Alert type="error"` offers a `common.retry` that re-runs the load - the shape `components/GrafanaDashboardList.tsx` already uses, and the one applied to the other lists (#6113/#6144 session details, #6077/#6078 instance list, #6089 cluster registry, #6095 proxy list). No new UI text: the banner reuses `common.fetchDataFailed`, the button `common.retry` and the header `common.unavailable` (page localization itself is tracked by #4619). ### How did you test this change? - `npx vitest run src/pages/cluster/__tests__/K8sCertsPage.test.tsx`: 12/12 green (11 pre-existing + the new case). - Mutation check: with `certs.tsx` reverted to `779b8c0e` the new case fails with "Unable to find an element with the text: 获取数据失败"; the three pre-existing failure-path cases (server reason, bare object, generic fallback) still pass with the change. - `npx eslint` on both 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 end in `Test` (existing file convention: the case reuses that file's naming) - [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]
