zjncs opened a new pull request, #5543: URL: https://github.com/apache/rocketmq-dashboard/pull/5543
## Problem `mapClusters` (`web/src/pages/studio/BrokerCluster.tsx:161`) hardcodes `connections: 0` for **every** nameserver, and both the table column (:432) and the CSV export column (:93) present that number as a fact — but the backend `NameServerVO` carries **only `addr` and `status`**. The metric cannot have a source, so the column displays (and exports) a fabricated zero. For contrast on the same page: the broker tab's connection count is populated from real runtime stats, and the proxy tab's from proxy data — only the nameserver column was fabricated. This is the same "display fallback substitutes a different value" class that PR #5510 just fixed in this file for `brokerName`. ## Fix Remove the field, the table column, the CSV export column, and the interface property. No replacement metric is shown — a number that cannot be real is worse than no number. ## Verification New test `does not render a Connections column for nameservers`: - **mutation** (restore the fabricated column): the test **fails** — proving it discriminates: the column header `连接数/Connections` is present with old code; - **after**: **16/16** in `BrokerCluster.test.tsx` (the new test passes; all 15 existing tests unchanged); - `tsc -b` clean (the interface property removal type-checks across the file). ```bash cd web && npx vitest run src/pages/studio/__tests__/BrokerCluster.test.tsx ``` -- 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]
