Skip to content

New admin page with basic file upload and processing

What

Create a new admin page for targeting messages with basic file upload and processing functionality.

Why

To provide administrators with a tool in the UI to manage targeted messages, similar to the existing broadcast messages feature.

Requirements

  1. Create a new page in the admin panel for targeting messages.
  2. Guard this admin panel by feature flag and SaaS feature check.
  3. Use best judgement for icon - perhaps the message icon/illustration
  4. Implement file upload simple functionality assuming entries are comma separated. The submission will read this data and store the namespace ids in the database.
  5. Process and save the uploaded file data into a targeted_messages and targeted_message_namespaces tables.
  6. Message about any non-existing namespace id's back to the user, but do not fail the submission.
  7. Allow updates to the namespace id list for resubmission.
  8. Allow file upload only(we will implement copy/paste text area for namespace ids in future iterations).
  9. Show list of existing targeted_messages. Perhaps follow broadcast messages area for page layout/setup.

Implementation Details

  1. Path: The new page should be accessible at a path similar to /admin/targeted_messages (comparable to the existing /admin/broadcast_messages).
  2. File Upload: Add an upload button that allows a single file to be uploaded.
  3. File Processing: Implement logic to process the uploaded file and save the data into a new database table.
  4. User Interface: Include both file upload and copy-paste options for data input.

Implementation Plan

  1. Iteration 1: basic admin UI via URL directly; index and new page. !183052 (merged)
  2. Iteration 2: add navigation in admin sidebar; edit page: !184959 (merged)

Notes

Additional Information

  • This feature will be EE-only for now. After the MVC (Minimum Viable Change), it may be moved to the core.
  • This issue does not include the consumption of the data (e.g., using the data to display an alert, banner, etc.).
Edited by Roy Liu