Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display alerts from today #111

Merged
merged 2 commits into from
Oct 18, 2023
Merged

display alerts from today #111

merged 2 commits into from
Oct 18, 2023

Conversation

MateoLostanlen
Copy link
Member

As requested by several users, I propose to display only the current day's alerts, as the previous days are useless for firefighters.

There are two options for accessing the history:
A dashboard page with history stats and access to images.
The ability to specify a date range for alerts to be displayed.

In my opinion, the dashboard is the best option, let's just do it in another PR.

The PR is relatively simple: I filter the days that are not equal to today.

I fixed a small error with filtered_df at the same time

@MateoLostanlen MateoLostanlen self-assigned this Oct 17, 2023
@MateoLostanlen MateoLostanlen added the type: enhancement New feature or request label Oct 17, 2023
Copy link
Contributor

@blenzi blenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this addition @MateoLostanlen. Just a minor suggestion about the comparisons.

I agree that a separate functionality and ideally another dashboard that allows retrieving the images and information about older alerts (by date, site, etc) is required. At very least this PR must pass to allow it on the API side: pyronear/pyro-api#277.

app/utils/alerts.py Outdated Show resolved Hide resolved
@MateoLostanlen MateoLostanlen merged commit 826ef9f into main Oct 18, 2023
8 checks passed
@MateoLostanlen MateoLostanlen deleted the only_todays_alerts branch October 18, 2023 06:58
MateoLostanlen added a commit that referenced this pull request Oct 25, 2023
MateoLostanlen added a commit that referenced this pull request Oct 30, 2023
* revert change from #111

* create filtering function

* filter live event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants