Skip to content
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