yyqdbngt opened a new pull request, #4080:
URL: https://github.com/apache/rocketmq-dashboard/pull/4080
## Summary
Adds CSV export to the Proxy cluster node table in the Studio Proxy page
(`web/src/pages/studio/Proxy.tsx`). The export button sits next to the
existing
node filter input above the table and exports the **currently filtered**
proxy
node inventory with the same fields shown in the table:
- Address
- Status (Healthy / Unhealthy / Warning / Unknown)
- Version
- Connections
- TPS
- Memory (%)
- CPU (%)
- Uptime
The file is named `rocketmq-proxy-nodes-YYYY-MM-DD.csv` and is built with the
shared `buildCsv`/`downloadCsv` helpers from `web/src/utils/download.ts`
(same
pattern as `Producer.tsx` and `cluster/clients.tsx`). The button is disabled
while the filtered node list is empty. Null metrics are exported as empty
cells.
Note: the search box above the node table (filtering the loaded list by
address/status/version) was already present on the baseline commit; this PR
keeps it as the filter source for the export, so the exported rows always
match
what the table currently shows.
## Why
Operators need an offline/auditable snapshot of the proxy node inventory
(e.g. during upgrades, capacity reviews or incident reports). Filtering the
table first and exporting the filtered subset lets them capture exactly the
nodes they care about instead of hand-copying table cells.
## Testing
- Local typecheck: `cd web && ./node_modules/.bin/tsc -b tsconfig.app.json`
→ exit 0.
- Server (Node 20): `./node_modules/.bin/vitest run
src/pages/studio/__tests__/Proxy.test.tsx` → 16/16 passed, including new cases:
- `exports the currently filtered Proxy nodes as CSV` (verifies blob
content, CSV escaping, file name and object URL revocation)
- `disables the CSV export button when the filtered node list is empty`
--
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]