[feature] support exporting alerts to Excel - #4332
Open
orangeCatDeveloper wants to merge 1 commit into
Open
Conversation
orangeCatDeveloper
force-pushed
the
feat/4212-alert-export
branch
from
August 18, 2026 02:36
1ee5f45 to
914e615
Compare
The alarm center could display alerts but offered no way to export them for offline statistics. Add an export endpoint that reuses the alert list filters and renders the matching single alerts as an .xlsx via easypoi.
orangeCatDeveloper
force-pushed
the
feat/4212-alert-export
branch
from
August 18, 2026 06:22
914e615 to
149331c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4212
The alarm center could display alerts but offered no way to export them, so users had no way to pull alert data out for offline statistics.
Add an "Export Alerts" button to the alarm center that downloads the matching alerts as an
.xlsxfile. The endpoint reuses the alert list's filter logic (status+ fuzzysearch), extracted into a sharedbuildSingleAlertSpecification, so the export always matches what the user currently sees. The matching single alerts are flattened for a tabular sheet —labels/annotationsmaps joined tok=v; ...strings, epoch-millis timestamps formatted to dates — and rendered via easypoi. Default sort isactiveAt descso the ordering column is visible in the sheet.The export is an unpaged full-result query, same as the existing monitor export — acceptable for typical alert volumes.
Verification
End-to-end, three scenarios (3 seeded alerts: 2 firing + 1 resolved):
UI — the new Export Alerts button in the alarm center:
