Frun1na opened a new pull request, #5645:
URL: https://github.com/apache/rocketmq-dashboard/pull/5645

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5644
   
   ### Brief Description
   
   The broker-cluster topology page polls `listClusters` every 2 s while live 
refresh is on, and every failing tick toasted `common.refreshFailed` and called 
`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) 3128ms
    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 passed (16)
   ```
   
   `npx eslint src/pages/studio/BrokerCluster.tsx 
src/pages/studio/__tests__/BrokerCluster.test.tsx` reports no issues.
   
   ### 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`
   - [ ] 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)
   
   ---
   
   Re-submission of #5073: the original PR was closed by the stale bot after 7 
days without review activity, and GitHub rejects reopening pull requests in 
this repository ("state cannot be changed"), so the same change is re-submitted 
rebased onto the current `rocketmq-studio` tip (`6a68042f`). The original 
thread stays available at #5073.
   


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