yyqdbngt opened a new pull request, #4051:
URL: https://github.com/apache/rocketmq-dashboard/pull/4051
## Summary
- Add `GET /api/system-alerts/deliveries/export` that reuses the existing
`channel` / `status` / `instanceId` filters of the deliveries page.
- Export at most 10,000 rows ordered by delivery id (reuses
`RmqAlertNotificationOutboxMapper.findPage`, which already applies
`ORDER BY o.id DESC`).
- CSV columns: Delivery ID, Alert ID, Alert Title, Alert Domain, Transition,
Instance ID, Channel, Status, Attempt Count, Created At, Delivered At,
Next Attempt At, Last Error. `messageContent` is never exported.
- Rendering goes through the shared `CsvUtil.appendRow`, which quotes every
cell and neutralizes spreadsheet formula injection.
- Frontend `exportNotificationDeliveries(params)` API helper plus an Export
button on the notification deliveries page that downloads the CSV built
from the current channel/status/instance filters.
## Why
Issue #3559 asks for a way to export notification deliveries for analysis
without leaking the rendered alert message content. The deliveries page
already exposes channel/status/instance filters, so the export endpoint
reuses the exact same normalization and paging query path, capped at
10,000 rows.
Fixes #3559
## Testing
- `cd web && ./node_modules/.bin/tsc -b tsconfig.app.json` → exit 0
- `cd web && ./node_modules/.bin/vitest run src/api/ops.test.ts
src/pages/ops/__tests__/NotificationDeliveriesPage.test.tsx`
→ 2 files passed, 31 tests passed
- `cd server && mvn -B -ntp test
-Dtest=NotificationOutboxServiceTest,SystemAlertControllerTest
-DfailIfNoTests=false`
→ Tests run: 40, Failures: 0, Errors: 0, Skipped: 0; BUILD SUCCESS
--
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]