From 957c0d43c2557d9972aa932243639c94dc74f4ef Mon Sep 17 00:00:00 2001 From: Yara Tercero Date: Wed, 1 Mar 2023 13:34:52 -0800 Subject: [PATCH] [Security Solution][Exceptions] - Fix bulk rule duplicate, exception modal rule count (#152403) ## Summary When user selects to bulk duplicate, a modal pops up asking them how they want to proceed with any rule exceptions. The rule count in this modal is wrong when all rules are selected. Updated so that now the count in the modal matches the actual selected count. --- .../rule_management_ui/components/rules_table/rules_tables.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx index dd173faade65..66d9d4bbf4e5 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx @@ -231,6 +231,7 @@ export const RulesTables = React.memo(({ selectedTab }) => { const shouldShowLinearProgress = (isFetched && isRefetching) || isUpgradingSecurityPackages; const shouldShowLoadingOverlay = (!isFetched && isRefetching) || isPreflightInProgress; + const numberOfSelectedRules = isAllSelected ? pagination.total : selectedRuleIds?.length ?? 1; return ( <> @@ -275,7 +276,7 @@ export const RulesTables = React.memo(({ selectedTab }) => { )} {isBulkEditFlyoutVisible && bulkEditActionType !== undefined && (