yyqdbngt opened a new pull request, #4085:
URL: https://github.com/apache/rocketmq-dashboard/pull/4085
# feat(dashboard): export the cluster summary table as CSV
## Summary
Add a CSV export button to the cluster summary table on the dashboard page.
The export uses the existing `buildCsv`/`downloadCsv` helpers and writes the
clusters of the currently selected instance (`selectedInstanceId`) to
`rocketmq-clusters-<instanceId>-YYYY-MM-DD.csv` (the instance part falls back
to `all` when no instance filter is active). The button is disabled while the
cluster list is empty.
Exported columns mirror the table: name, status, type, version, brokers,
proxies, topics, groups, TPS in, TPS out.
## Why
Users monitoring cluster health currently have to read the on-screen table
manually. Exporting the summary as CSV makes the data available for offline
analysis, reporting and diffing across instances.
## Testing
- `cd web && ./node_modules/.bin/tsc -b tsconfig.app.json` passes (exit 0).
- `./node_modules/.bin/vitest run
src/pages/home/__tests__/DashboardPage.test.tsx` passes; new cases cover:
- exporting the current instance's clusters with the expected CSV content
and `rocketmq-clusters-instance-a-<date>.csv` filename,
- using `rocketmq-clusters-all-<date>.csv` when no instance is selected,
- the export button being disabled when there are no clusters.
--
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]