From 6bc963d0e0c045c7f6689e9d11539569ef161f2d Mon Sep 17 00:00:00 2001 From: whikernel Date: Sun, 29 Oct 2023 16:03:41 +0100 Subject: [PATCH] [ADD] Unknown resolution in alerts --- source/app/blueprints/alerts/templates/alerts.html | 5 ++++- source/app/datamgmt/manage/manage_cases_db.py | 3 +++ source/app/post_init.py | 2 ++ source/app/static/assets/js/iris/alerts.js | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/source/app/blueprints/alerts/templates/alerts.html b/source/app/blueprints/alerts/templates/alerts.html index d5e18f99e..bdc2864c5 100644 --- a/source/app/blueprints/alerts/templates/alerts.html +++ b/source/app/blueprints/alerts/templates/alerts.html @@ -260,7 +260,10 @@ True positive with impact - +
diff --git a/source/app/datamgmt/manage/manage_cases_db.py b/source/app/datamgmt/manage/manage_cases_db.py index 36fde4c1a..ee13ea189 100644 --- a/source/app/datamgmt/manage/manage_cases_db.py +++ b/source/app/datamgmt/manage/manage_cases_db.py @@ -192,6 +192,9 @@ def map_alert_resolution_to_case_status(case_status_id): elif case_status_id == CaseStatus.true_positive_without_impact.value: ares = search_alert_resolution_by_name('True Positive Without Impact', exact_match=True) + elif case_status_id == CaseStatus.unknown.value: + ares = search_alert_resolution_by_name('Unknown', exact_match=True) + else: ares = search_alert_resolution_by_name('Not Applicable', exact_match=True) diff --git a/source/app/post_init.py b/source/app/post_init.py index 9712f5c54..afb4f6915 100644 --- a/source/app/post_init.py +++ b/source/app/post_init.py @@ -731,6 +731,8 @@ def create_safe_alert_resolution_status(): resolution_status_description="The alert was a true positive but had no impact") create_safe(db.session, AlertResolutionStatus, resolution_status_name='Not Applicable', resolution_status_description="The alert is not applicable") + create_safe(db.session, AlertResolutionStatus, resolution_status_name='Unknown', + resolution_status_description="Unknown resolution status") def create_safe_case_states(): diff --git a/source/app/static/assets/js/iris/alerts.js b/source/app/static/assets/js/iris/alerts.js index 0fa72417f..bed337809 100644 --- a/source/app/static/assets/js/iris/alerts.js +++ b/source/app/static/assets/js/iris/alerts.js @@ -812,6 +812,8 @@ function alertResolutionToARC(resolution) { return `True Positive without impact` case 'False Positive': return `False Positive` + case 'Unknown': + return `Unknown resolution` } }