Skip to content

Commit 28f7fec

Browse files
Change filter for rule monitoring gaps (#209983)
## Change filter for rule monitoring gaps Keep only 1 button, and make selection more clear https://github.com/user-attachments/assets/f720ce03-fc38-42ef-87aa-99e22accc646 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 0007203)
1 parent 1511c97 commit 28f7fec

2 files changed

Lines changed: 5 additions & 19 deletions

File tree

  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_gaps/components/rules_with_gaps_overview_panel

x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_gaps/components/rules_with_gaps_overview_panel/index.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ export const RulesWithGapsOverviewPanel = () => {
6464
</EuiButton>
6565
);
6666

67-
const handleShowRulesWithGapsFilterButtonClick = (value: boolean) => {
67+
const handleShowRulesWithGapsFilterButtonClick = () => {
6868
setFilterOptions({
69-
showRulesWithGaps: value,
69+
showRulesWithGaps: !showRulesWithGaps,
7070
});
7171
};
7272

@@ -119,16 +119,10 @@ export const RulesWithGapsOverviewPanel = () => {
119119
</EuiFlexItem>
120120
<EuiFlexItem grow={false}>
121121
<EuiFilterGroup>
122-
<EuiFilterButton
123-
withNext
124-
hasActiveFilters={!showRulesWithGaps}
125-
onClick={() => handleShowRulesWithGapsFilterButtonClick(false)}
126-
>
127-
{i18n.RULE_GAPS_OVERVIEW_PANEL_SHOW_ALL_RULES_LABEL}
128-
</EuiFilterButton>
129122
<EuiFilterButton
130123
hasActiveFilters={showRulesWithGaps}
131-
onClick={() => handleShowRulesWithGapsFilterButtonClick(true)}
124+
onClick={handleShowRulesWithGapsFilterButtonClick}
125+
iconType={showRulesWithGaps ? `checkInCircleFilled` : undefined}
132126
>
133127
{i18n.RULE_GAPS_OVERVIEW_PANEL_SHOW_RULES_WITH_GAPS_LABEL}
134128
</EuiFilterButton>

x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_gaps/components/rules_with_gaps_overview_panel/translations.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,10 @@ export const RULE_GAPS_OVERVIEW_PANEL_LABEL = i18n.translate(
1313
defaultMessage: 'Total rules with gaps:',
1414
}
1515
);
16-
17-
export const RULE_GAPS_OVERVIEW_PANEL_SHOW_ALL_RULES_LABEL = i18n.translate(
18-
'xpack.securitySolution.ruleGapsOverviewPanel.showAllRulesLabel',
19-
{
20-
defaultMessage: 'Show all rules',
21-
}
22-
);
23-
2416
export const RULE_GAPS_OVERVIEW_PANEL_SHOW_RULES_WITH_GAPS_LABEL = i18n.translate(
2517
'xpack.securitySolution.ruleGapsOverviewPanel.showRulesWithGapsLabel',
2618
{
27-
defaultMessage: 'Show rules with gaps',
19+
defaultMessage: 'Only rules with gaps',
2820
}
2921
);
3022

0 commit comments

Comments
 (0)