Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[feat] Export alert history as CSV

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
dart, flutter

Research direction

Read lib/services/metrics_csv.dart for the existing CSV export pattern, then inspect lib/state/alert_log.dart and lib/views/ping_matrix/widgets/alert_log_dialog.dart to see the event fields and dialog flow. Add lib/services/alerts_csv.dart, update the four language files, and add tests under test/ for empty input, escaping, order, and severity mapping. Done means the dialog exports a correctly formatted CSV and the stated Flutter checks pass.

Written by the indexing model from the issue text.

Description

enhancement good first issue

The alert log lives only in memory (lib/state/alert_log.dart, capped at 200 events) and the Alerts dialog can only clear it (lib/views/ping_matrix/widgets/alert_log_dialog.dart). There is no way to keep incident history for a report.

Scope

  • Add a pure buildAlertsCsv(List<AlertEvent>) under lib/services/, following the buildMetricsCsv pattern in lib/services/metrics_csv.dart:
    • header: timestamp,target_id,target_name,from,to,severity,rtt_ms,loss_rate,
    • ISO-8601 UTC timestamps, RFC-4180 quoting for commas/quotes/newlines,
    • oldest-first order (reverse of the newest-first in-memory list).
  • Add an exportAlertsCsv(...) helper that saves the file via path_provider (mirror exportMetricsCsv), filename velocenet-alerts-<timestamp>.csv.
  • Add an Export CSV button to AlertLogDialog next to "Clear all"; disabled when the log is empty; snackbar with the saved path or an error.
  • Add the new i18n keys to all four assets/lang/*.json files.
  • Unit tests: empty log, escaping (comma/quote/newline), ordering, severity mapping (info/warning/critical).

Acceptance criteria

  • flutter analyze and flutter test pass.
  • The exported CSV opens correctly in Excel/LibreOffice.
  • In-memory behavior and the 200-event cap are unchanged.

Files

  • lib/services/ (new alerts_csv.dart)
  • lib/views/ping_matrix/widgets/alert_log_dialog.dart
  • assets/lang/en.json, fa.json, ru.json, zh.json
  • test/
Dominant language
Dart
Stars
15
Forks
1
Avg merge
2h 55m
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Cadman021/VeloceNet-Studio

All issues in Cadman021/VeloceNet-Studio

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.