Frun1na opened a new pull request, #5647:
URL: https://github.com/apache/rocketmq-dashboard/pull/5647
### Which Issue(s) This PR Fixes
- Fixes #5646
### Brief Description
The NameServer registry table on the cluster topology page showed a
Connections column that never came from the API: the page mapped every
NameServer with a hardcoded `connections: 0` (`NameServerInfo` in
`web/src/api/cluster.ts` carries only `addr` and `status`), and the same value
was written into the NameServer CSV export. A "0" that no API reports reads as
a measurement — an operator can only conclude that nothing is connected to any
NameServer.
This drops the fabricated column, its field on the page-local
`NameServerRecord`, and its CSV header, leaving the table to the fields the API
actually provides. The Proxy table keeps its Connections column: `ProxyInfo`
really does carry the number.
### 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) 3064ms
Test Files 1 passed (1)
Tests 16 passed (16)
```
The new test fails on the unpatched page (the column and the CSV header are
still there):
```
× does not fabricate a connections column for NameServers
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
- [x] Documentation touched where behaviour changed (README / `docs/` /
in-app help)
---
Re-submission of #5075: 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 #5075.
--
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]