apache / apache/rocketmq-dashboard
Instance inventory cannot be exported
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 683
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 58
Description
## Problem
Topic, consumer group, studio user, system alert, and audit log inventories can be exported as CSV, but the instance inventory cannot. Operators preparing an environment review, access audit, or capacity plan currently have to copy instance rows manually.
## Current behavior and reproduction
1. Open **Instance** management.
2. Apply the type/search filter matching the review scope.
3. Try to export the filtered inventory: the page offers create, edit, delete, and import actions, but no export.
`web/src/pages/instance/index.tsx` has no export control, and the backend has no instance export endpoint. The existing list endpoint already applies the page's `type` and `search` filters and returns the complete filtered inventory, so the data needed for an export is already available.
## Proposed behavior
- Add an export action to the instance page that exports the inventory matching the current type/search filter, not just the visible page.
- Export non-sensitive fields: instance ID, vendor, type, endpoint, region ID/name, topic count, consumer group count, resource-count availability, remark, and created/modified timestamps.
- Do not export credentials or other secret material — the instance table itself contains none, and the export should stay that way.
- Use the shared CSV writer so cells are quoted and spreadsheet formula injection is prevented.
- Show a loading state while the export runs and surface backend/export errors instead of failing silently.
## Acceptance criteria
- [ ] The export requests the inventory with the current type/search filters.
- [ ] Exported columns cover the listed non-sensitive fields.
- [ ] CSV cells are quoted and formula-injection safe via the shared CSV utility.
- [ ] The export shows a loading state and surfaces errors.
- [ ] Regression coverage verifies the filtered request and CSV download.
## Importance
Nice-to-have. Instance inventories are a common input to access reviews and capacity planning; the current manual-copy workaround works but is slow and error-prone for non-trivial inventories.
## Duplicate check
Searched open and closed issues/PRs for `instance export`, `export instance inventory`, `instance CSV`. No existing issue or PR adds export to the instance inventory.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in web/src/pages/instance/index.tsx and trace the existing filtered instance list request, then locate the backend instance list endpoint and shared CSV writer. Add an export flow using the current type/search filters, non-sensitive columns, loading state, and error handling. Done means the filtered CSV downloads safely and regression coverage verifies the request and download.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- api, backend, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100