Skip to content

Conversation

@conservationtimothy
Copy link
Contributor

@conservationtimothy conservationtimothy commented Sep 29, 2025

Goal

Add simple incidents management interface to the Alerts Dashboard, enabling users to view, create, and manage incidents with advanced multi-select source functionality including custom bounding box selection. This is just a first phase to:

  1. Allow us to view and interact with the API
  2. Implement most of the logic responsible for creating and viewing incidents making it simpler when Figma is 100% ready to just implement visual changes where logic is already defined. Closes Build Simple UI to be able to visually test new API for Incidents #190

To get this to work, I use local Docker to get this up and running, leveraging the tests DB. Changes we made to dbConnection.ts are just to get this app up and running using the existing guardianconnector DB for existing stuff AND using the test DB for the new incidents (warehouse) stuff.

All you need to do is run:

docker-compose -f docker-compose.tests.yml up database -d

docker-compose -f docker-compose.tests.yml down

And it'll create the new tables and then run:

pnpm dev

it'll start up and connect to both DBs.

Screenshots

<img width="1470" height="956" alt="Screenshot 2025-09-29 at 15 01 18" src="https://github.com/user-attachments/assets/aa3b34a8-2f05-4bc3-b7ee-703c84c6c0
Screenshot 2025-09-29 at 15 01 18
Screenshot 2025-09-29 at 15 01 11
Screenshot 2025-09-29 at 15 01 04
f3" />

What I changed

Frontend Components

•⁠ ⁠⁠ components/AlertsDashboard.vue ⁠: Added comprehensive incidents management functionality

  • Added incidents state management and API integration
  • Implemented "View Incidents" toggle button
  • Created right sidebar for incidents management
  • Added multi-select functionality (Ctrl+click and bounding box)
  • Implemented highlighting for incident sources
  • Added incident creation form with validation
  • Added JSDoc documentation for all new functions

Key Features Added

•⁠ ⁠Incidents View: Toggle button to show/hide incidents with right sidebar
•⁠ ⁠Source Highlighting: Yellow highlighting of incident sources on the map
•⁠ ⁠Multi-Select: Ctrl+click and bounding box selection (ctrl + click as well) of map features
•⁠ ⁠Incident Creation: Comprehensive form for creating new incidents
•⁠ ⁠Visual Feedback: Real-time highlighting and selection counters
•⁠ ⁠Error Handling: Proper error handling and user feedback

What I'm not doing here

  • Backend alerts changes

@rudokemper
Copy link
Member

@conservationtimothy I am assuming it is probably best to wait a bit to review until the other PRs have been merged, and any requisite changes here have been made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Simple UI to be able to visually test new API for Incidents

3 participants