Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to enhance the functionality of the alerts system and improve error handling across various routes and functions. The most important changes include adding support for custom conditions in alert filters, improving error handling and logging, and updating the user interface to include custom conditions.
Enhancements to alert filtering:
source/app/blueprints/alerts/alerts_routes.py
: Added support for custom conditions and fields in thealerts_list_route
function. [1] [2]source/app/datamgmt/alerts/alerts_db.py
: Introduced functionsbuild_condition
andcombine_conditions
to handle custom conditions and logical operators in alert filtering. Updatedget_filtered_alerts
to support custom conditions, logical operators, and field selection. [1] [2] [3] [4] [5]Improvements to error handling and logging:
source/app/blueprints/dashboard/dashboard_routes.py
: Added error logging in thelogout
function.source/app/blueprints/login/login_routes.py
: Enhanced logging for user creation and error scenarios in theoidc_authorise
function.source/app/blueprints/manage/manage_users.py
: Added exception logging in theview_delete_user
function.User interface updates:
source/app/blueprints/alerts/templates/alerts.html
: Added UI elements for custom conditions and examples to guide users.Other significant changes:
source/app/blueprints/alerts/alerts_routes.py
: Automatically assignalert_owner_id
to the current user if not set during batch updates.source/app/datamgmt/alerts/alerts_db.py
: Updateddelete_related_alerts_cache
function to accept a list of alert IDs and ensure related caches are deleted when alerts are deleted. [1] [2] [3]