From fe7280088a878747d0e030a781e567a8a665fc59 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Mon, 27 Nov 2023 21:10:08 +0900 Subject: [PATCH] fix(main): removed excluded rule count #1206 --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index f31cf51f2..57314c14f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1116,11 +1116,11 @@ impl App { }) .collect_vec(); let selection_status_items = &[ - format!("1. Core ({} rules) ( status: test, stable | level: high, critical )", sections_rule_cnt[0].iter().map(|(_, cnt)| cnt).sum::()), - format!("2. Core+ ({} rules) ( status: test, stable | level: medium, high, critical )", sections_rule_cnt[1].iter().map(|(_, cnt)| cnt).sum::()), - format!("3. Core++ ({} rules) ( status: experimental, test, stable | level: medium, high, critical )", sections_rule_cnt[2].iter().map(|(_, cnt)| cnt).sum::()), - format!("4. All alert rules ({} rules) ( status: * | level: low+ )", sections_rule_cnt[3].iter().map(|(_, cnt)| cnt).sum::()), - format!("5. All event and alert rules ({} rules) ( status: * | level: informational+ )", sections_rule_cnt[4].iter().map(|(_, cnt)| cnt).sum::()) + format!("1. Core ({} rules) ( status: test, stable | level: high, critical )", sections_rule_cnt[0].iter().map(|(_, cnt)| cnt).sum::() - sections_rule_cnt[0].get("excluded").unwrap_or(&0)), + format!("2. Core+ ({} rules) ( status: test, stable | level: medium, high, critical )", sections_rule_cnt[1].iter().map(|(_, cnt)| cnt).sum::() - sections_rule_cnt[1].get("excluded").unwrap_or(&0)), + format!("3. Core++ ({} rules) ( status: experimental, test, stable | level: medium, high, critical )", sections_rule_cnt[2].iter().map(|(_, cnt)| cnt).sum::() - sections_rule_cnt[2].get("excluded").unwrap_or(&0)), + format!("4. All alert rules ({} rules) ( status: * | level: low+ )", sections_rule_cnt[3].iter().map(|(_, cnt)| cnt).sum::() - sections_rule_cnt[3].get("excluded").unwrap_or(&0)), + format!("5. All event and alert rules ({} rules) ( status: * | level: informational+ )", sections_rule_cnt[4].iter().map(|(_, cnt)| cnt).sum::() - sections_rule_cnt[4].get("excluded").unwrap_or(&0)) ]; let selected_index = Select::with_theme(&ColorfulTheme::default())