Skip to content

CSV upload and download for rules #533

@bracyw

Description

@bracyw

Description

Implement Upload and Download buttons on the Notification Rules page. Upload parses a CSV into rules and batch-adds them via a confirmation dialog. Download exports current rules to CSV. Enables portable/shareable rule configurations across the team.

Acceptance Criteria

  • Upload opens file picker for .csv, parses into rules, shows confirmation dialog, then adds via PUT /rules/add
  • Parsing errors surface as toast messages
  • Download fetches rules via GET /rules/{client_id} and exports as CSV (columns: id, topic, expr, debounce_time)
  • TODO comments for description and uploaded_by columns (not yet on backend)

Proposed Solution

Hidden <input type="file" accept=".csv"> behind Upload button. Parse with Papa Parse or manual CSV split. Confirmation via DynamicDialog (reference RunFormComponent pattern). Download builds CSV string from rules response, triggers via Blob + URL.createObjectURL. Test with sample CSV upload, verify rules appear via Postman GET /rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    angular-clientDevelopment Focused in the Frontend

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions