Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.18] Change filter for rule monitoring gaps (#209983) #210686

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ export const RulesWithGapsOverviewPanel = () => {
</EuiButton>
);

const handleShowRulesWithGapsFilterButtonClick = (value: boolean) => {
const handleShowRulesWithGapsFilterButtonClick = () => {
setFilterOptions({
showRulesWithGaps: value,
showRulesWithGaps: !showRulesWithGaps,
});
};

Expand Down Expand Up @@ -119,16 +119,10 @@ export const RulesWithGapsOverviewPanel = () => {
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFilterGroup>
<EuiFilterButton
withNext
hasActiveFilters={!showRulesWithGaps}
onClick={() => handleShowRulesWithGapsFilterButtonClick(false)}
>
{i18n.RULE_GAPS_OVERVIEW_PANEL_SHOW_ALL_RULES_LABEL}
</EuiFilterButton>
<EuiFilterButton
hasActiveFilters={showRulesWithGaps}
onClick={() => handleShowRulesWithGapsFilterButtonClick(true)}
onClick={handleShowRulesWithGapsFilterButtonClick}
iconType={showRulesWithGaps ? `checkInCircleFilled` : undefined}
>
{i18n.RULE_GAPS_OVERVIEW_PANEL_SHOW_RULES_WITH_GAPS_LABEL}
</EuiFilterButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,10 @@ export const RULE_GAPS_OVERVIEW_PANEL_LABEL = i18n.translate(
defaultMessage: 'Total rules with gaps:',
}
);

export const RULE_GAPS_OVERVIEW_PANEL_SHOW_ALL_RULES_LABEL = i18n.translate(
'xpack.securitySolution.ruleGapsOverviewPanel.showAllRulesLabel',
{
defaultMessage: 'Show all rules',
}
);

export const RULE_GAPS_OVERVIEW_PANEL_SHOW_RULES_WITH_GAPS_LABEL = i18n.translate(
'xpack.securitySolution.ruleGapsOverviewPanel.showRulesWithGapsLabel',
{
defaultMessage: 'Show rules with gaps',
defaultMessage: 'Only rules with gaps',
}
);

Expand Down