apache / apache/rocketmq-dashboard
[Studio][Feature] Add resource operation timelines to audit logs
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 683
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 58
Description
## Problem
The Studio audit page is a global log list. Although every audit record can carry `resourceType`, `target`, and `clusterId`, operators cannot open the history of one exact Topic, Consumer Group, instance, DLQ, or other resource.
The existing `search` parameter is a fuzzy match across operator, resource name, and detail. It cannot reliably answer "what happened to this exact resource?", and the target column is currently plain text with a tooltip.
## Proposed behavior
Add a read-only resource operation timeline to the audit page:
1. Extend audit list and export queries with an optional exact `target` filter.
2. Treat a resource identity as `resourceType + target + clusterId`; do not group by target alone.
3. Make non-empty target values in the audit table open a timeline drawer.
4. Show that resource's operations in reverse chronological order with timestamp, operator, operation, result, detail, and error.
5. Support an independent date range and server-side pagination inside the drawer.
6. Export exactly the selected resource and date range as CSV.
## Compatibility and safety
- Existing audit queries behave unchanged when `target` is omitted.
- The exact filter must use equality, not fuzzy matching or SQL wildcard behavior.
- The feature is observational only. It does not mutate audit records or RocketMQ resources.
- Older timeline responses must not overwrite a newer resource or date selection.
## Acceptance criteria
- Backend repository, service, controller, and API tests cover exact target matching and parameter propagation.
- Target values that only contain the requested value as a substring are excluded.
- The drawer key includes resource type, target, and cluster id.
- Timeline pagination and date changes fetch the expected server query.
- CSV export uses the same exact resource scope and date range shown in the drawer.
- Empty targets are rendered without a timeline action.
- Chinese and English UI text and focused regression tests are included.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the existing audit repository, service, controller, and API tests, then trace the audit table and timeline drawer entry points. Verify exact resource filtering, pagination, date changes, and CSV export across backend and UI tests. Done means the acceptance criteria pass, including resource identity, empty-target handling, stale-response protection, and Chinese and English text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100