-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution][Alerts] adds suppression for missing fields optio…
…ns for security rules (#155055) ## Summary - adresses #150101 - fixes #155242 - introduces UI options for selections 2 modes for suppressing or not suppressing alerts with missing **Group By** fields - adds accordion that contains all suppression related logic ### UX changes #### Rule edit page <details> <summary>Accordion closed</summary> <img width="1042" alt="Screenshot 2023-04-21 at 16 09 44" src="https://user-images.githubusercontent.com/92328789/233700543-8a5091e0-6455-4d76-b6b6-7a280d747d0c.png"> </details> <details> <summary>Accordion opened</summary> <img width="1017" alt="Screenshot 2023-04-24 at 19 44 33" src="https://user-images.githubusercontent.com/92328789/234087516-58b88dab-0285-47ca-a016-bfff31dbebae.png"> </details> #### Rule Details page <img width="2293" alt="Screenshot 2023-04-19 at 18 50 13" src="https://user-images.githubusercontent.com/92328789/234004667-d879bfff-0d11-4bc9-ab5b-7ad904e29d1f.png"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
- Loading branch information
Showing
26 changed files
with
1,105 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
..._solution/public/detections/components/rules/description_step/technical_preview_badge.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiIcon, EuiToolTip, EuiBetaBadge } from '@elastic/eui'; | ||
|
||
import type { LicenseService } from '../../../../../common/license'; | ||
import { minimumLicenseForSuppression } from '../../../../../common/detection_engine/rule_schema'; | ||
|
||
import * as i18n from './translations'; | ||
|
||
interface TechnicalPreviewBadgeProps { | ||
label: string; | ||
license: LicenseService; | ||
} | ||
|
||
export const TechnicalPreviewBadge = ({ label, license }: TechnicalPreviewBadgeProps) => ( | ||
<> | ||
{label} | ||
<EuiBetaBadge | ||
label={i18n.ALERT_SUPPRESSION_TECHNICAL_PREVIEW} | ||
style={{ verticalAlign: 'middle', marginLeft: '8px' }} | ||
size="s" | ||
/> | ||
{!license.isAtLeast(minimumLicenseForSuppression) && ( | ||
<EuiToolTip position="top" content={i18n.ALERT_SUPPRESSION_INSUFFICIENT_LICENSE}> | ||
<EuiIcon type={'warning'} size="l" color="#BD271E" style={{ marginLeft: '8px' }} /> | ||
</EuiToolTip> | ||
)} | ||
</> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.