pyronear / pyro-platform

Detection & monitoring platform of wildfires
https://platform.pyronear.org/
Apache License 2.0
10 stars 11 forks source link

Alert acknowledgement #33

Closed pechouc closed 3 years ago

pechouc commented 3 years ago

Goal of the PR

Main changes

Screenshots

  1. The user clicks on the alert marker (NB: interval component is disabled from this point on)

Capture d’écran 2020-12-13 à 09 35 55

  1. The user checks the box to acknowledge the reception of the alert

Capture d’écran 2020-12-13 à 09 36 06

  1. The user clicks on other buttons (any button on the "Alertes" map)

Capture d’écran 2020-12-13 à 09 36 16

  1. The user can click again on the alert marker and the checkbox is not accessible anymore

Capture d’écran 2020-12-13 à 09 36 19

Question

With this preliminary solution, if the user acknowledges the alert, moves to the "Niveaux de Risques" dashboard and comes back to the "Alertes" map, the alert data is reloaded and the acknowledgement checkbox can again be checked. I think it is because we are re-instantiating the interval component as part of the "Alertes" map.

I guess we will be able to bring a more solid solution to this issue once we can add an if statement in the callback that verifies whether the is_acknowledge field has already been changed to True or not. But at the moment, I am not sure to see a good solution to this problem without making the API call, etc.

Do we agree to move forward with this imperfect solution for the demo-day and come back to it with a proper use of the client in the callback later on?

cc @Akilditu @frgfm