Skip to content

Commit

Permalink
[Security Solution] Don't mute rules when bulk editing rule actions (e…
Browse files Browse the repository at this point in the history
…lastic#140626)

## Intro

This PR modifies the logic of bulk updating rule actions, in preparation for elastic#137430

## Summary

- Removes the mute logic for bulk updating rule actions
- Remove option for “Perform no actions” from the bulk update rule actions dropdown options ONLY (option still available when creating or editing rules individually)
- Also corrects bulk update rule actions flyout, so that:
    - available actions are always displayed
    - copy referring to using "Perform No Actions" to mute all selected rules is no longer displayed.

## Screenshots

**Removed unwanted copy and "On each rule execution" selected as default**
![image](https://user-images.githubusercontent.com/5354282/191498419-10299ee5-4a9e-474e-b00a-657dc90816fa.png)

**"Perform No Action" option no longer available**
![image](https://user-images.githubusercontent.com/5354282/191498500-3965edad-8142-4834-808e-c210e72e17cb.png)

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 7aa5428)
  • Loading branch information
jpdjere committed Sep 27, 2022
1 parent 72b5307 commit ee29986
Show file tree
Hide file tree
Showing 15 changed files with 412 additions and 285 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export * from './src/default_per_page';
export * from './src/default_risk_score_mapping_array';
export * from './src/default_severity_mapping_array';
export * from './src/default_threat_array';
export * from './src/default_throttle_null';
export * from './src/default_to_string';
export * from './src/default_uuid';
export * from './src/from';
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
* Side Public License, v 1.
*/

import { TimeDuration } from '@kbn/securitysolution-io-ts-types';
import * as t from 'io-ts';

export const throttle = t.string;
export const throttle = t.union([
t.literal('no_actions'),
t.literal('rule'),
TimeDuration({ allowedUnits: ['h', 'd'] }),
]);
export type Throttle = t.TypeOf<typeof throttle>;

export const throttleOrNull = t.union([throttle, t.null]);
export type ThrottleOrNull = t.TypeOf<typeof throttleOrNull>;

export const throttleOrNullOrUndefined = t.union([throttle, t.null, t.undefined]);
export type ThrottleOrUndefinedOrNull = t.TypeOf<typeof throttleOrNullOrUndefined>;
Loading

0 comments on commit ee29986

Please sign in to comment.