diff --git a/src/alerts/mod.rs b/src/alerts/mod.rs index db22754f5..82581ffff 100644 --- a/src/alerts/mod.rs +++ b/src/alerts/mod.rs @@ -886,6 +886,7 @@ pub struct AlertsInfo { low: u64, medium: u64, high: u64, + critical: u64, } // TODO: add RBAC @@ -898,6 +899,7 @@ pub async fn get_alerts_info() -> Result { let mut low = 0; let mut medium = 0; let mut high = 0; + let mut critical = 0; for (_, alert) in alerts.iter() { total += 1; @@ -911,7 +913,7 @@ pub async fn get_alerts_info() -> Result { Severity::Low => low += 1, Severity::Medium => medium += 1, Severity::High => high += 1, - _ => {} + Severity::Critical => critical += 1, } } @@ -923,5 +925,6 @@ pub async fn get_alerts_info() -> Result { low, medium, high, + critical, }) } diff --git a/src/prism/home/mod.rs b/src/prism/home/mod.rs index 48b062e31..95e03b8ce 100644 --- a/src/prism/home/mod.rs +++ b/src/prism/home/mod.rs @@ -149,7 +149,7 @@ pub async fn generate_home_response(key: &SessionKey) -> Result Result