Frun1na opened a new pull request, #5073:
URL: https://github.com/apache/rocketmq-dashboard/pull/5073
### Which Issue(s) This PR Fixes
- Fixes #<issue-id>
### Brief Description
The broker-cluster topology page polls `listClusters` every 2 s while live
refresh is on, and every failing tick toasts `common.refreshFailed` and calls
`clearData()`. With the server briefly down the operator gets an error toast
every 2 s and the topology they are looking at is blanked between ticks.
This adds the same silent-tick treatment the consumer page uses (#4968): a
`silent` flag on `loadData` — the poller passes `silent=true`, which skips the
spinner, skips the toast, and keeps the last good topology. An explicit refresh
(button) keeps the loud failure: data clears and one toast shows.
### How Did You Test This Change?
```
cd web && npx vitest run src/pages/studio/__tests__/BrokerCluster.test.tsx
✓ src/pages/studio/__tests__/BrokerCluster.test.tsx (16 tests) 2872ms
Test Files 1 passed (1)
Tests 16 passed (16)
```
The new test fails on the unpatched page (toast fires and the table is
cleared on a silent tick):
```
× keeps the last topology and stays quiet when a live-refresh tick fails
Tests 1 failed | 15 skipped (16)
```
`npx eslint` on the two touched files reports no issues; `tsc -b && vite
build` passes.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`feat:` / `fix:` /
`refactor:` / `chore:` / `docs:` / `perf:`)
- [x] Tests added or updated for non-trivial changes, test methods named
`...Test`
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
- [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks)
- [x] New source files carry the ASF license header
- [ ] Documentation touched where behaviour changed (README / `docs/` /
in-app help)
--
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]