-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[SIEM][Detection Engine] Adds actions to Rule Details #54828
Conversation
Pinging @elastic/siem (Team:SIEM) |
@@ -189,7 +189,7 @@ export const duplicateRules = async ({ rules }: DuplicateRulesProps): Promise<Ru | |||
}, | |||
body: JSON.stringify({ | |||
...rule, | |||
name: `${rule.name} [Duplicate]`, | |||
name: `${rule.name} [${i18n.DUPLICATE}]`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch! 👍
@@ -65,6 +69,9 @@ export const deleteRulesAction = async ( | |||
errors.map(e => e.error.message), | |||
dispatchToaster | |||
); | |||
} else { | |||
// FP: See https://github.com/typescript-eslint/typescript-eslint/issues/1138#issuecomment-566929566 | |||
onRuleDeleted?.(); // eslint-disable-line no-unused-expressions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the link when putting the disable in 👍 , really helpful and interesting to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, they're stilling working out some quirks with linting these new language features it seems. FWIW it was happy with the below, but I wanted the code feng shui.... 😬
if (onRuleDeleted) {
onRuleDeleted();
}
); | ||
expect(wrapper).toMatchSnapshot(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked at the code, test ran it, and everything looks as advertised.
Appreciate the one off fix for an accidental earlier bug.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
This PR adds the following actions to the `Rule Details` page via the `RuleActionsOverflow` component (which is permission-aware): * Duplicate * Export * Delete Additional fixes include: * Fixes duplication action (recent regression as part of status update additions) * i18n of `Duplicate` postfix when duplicating rules * Adds success toast when duplication is a success * Enabled `Edit Index Patterns` batch action * Removes unused `Run Rule Manually` action Rule Details Actions: ![image](https://user-images.githubusercontent.com/2946766/72385375-9c3a6880-36dc-11ea-8249-4ae92eb72dd1.png) Edit Index Patterns Batch Action: ![image](https://user-images.githubusercontent.com/2946766/72385468-c5f38f80-36dc-11ea-93c8-b70e4982f01a.png) Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [X] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) - [x] 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/master/packages/kbn-i18n/README.md) - [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
This PR adds the following actions to the `Rule Details` page via the `RuleActionsOverflow` component (which is permission-aware): * Duplicate * Export * Delete Additional fixes include: * Fixes duplication action (recent regression as part of status update additions) * i18n of `Duplicate` postfix when duplicating rules * Adds success toast when duplication is a success * Enabled `Edit Index Patterns` batch action * Removes unused `Run Rule Manually` action Rule Details Actions: ![image](https://user-images.githubusercontent.com/2946766/72385375-9c3a6880-36dc-11ea-8249-4ae92eb72dd1.png) Edit Index Patterns Batch Action: ![image](https://user-images.githubusercontent.com/2946766/72385468-c5f38f80-36dc-11ea-93c8-b70e4982f01a.png) Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [X] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) - [x] 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/master/packages/kbn-i18n/README.md) - [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* upstream/master: (72 commits) [ML] Calculate model memory limit API integration tests (elastic#54557) Skip flakey index template component integration tests. (elastic#54878) Add label and icon to nested fields in the doc table (elastic#54199) Reverse dependency of home plugin and apm/ml/cloud (elastic#52883) [SIEM][Detection Engine] Order JSON keys, fix scripts, update pre-packaged rules update invalid snapshot add readme note about alerting / manage_api_key cluster privilege (elastic#54639) [SIEM] New Overview Page (elastic#54783) [Uptime] Feature/refactor context initialization (elastic#54494) Upgrade EUI to v18.2.0 (elastic#54786) [SIEM] [Detection engine] from signals to timeline (elastic#54769) [Index Management] Add Mappings Editor to Index Template Wizard (elastic#47562) [SIEM][Detection Engine] Removes deprecated filter from mapping [Maps] Add categorical styling (elastic#54408) Add mapbox-gl-rtl-text library (elastic#54842) [SIEM][Detection Engine] Adds actions to Rule Details (elastic#54828) Lexicographically sort location tags (elastic#54832) [Maps] expand extent filter to tile boundaries (elastic#54276) [Maps] Use v7.6 Elastic Maps Service API (elastic#54399) [DOCS] Adds monitoring setting (elastic#54819) ...
## Summary This PR adds the following actions to the `Rule Details` page via the `RuleActionsOverflow` component (which is permission-aware): * Duplicate * Export * Delete Additional fixes include: * Fixes duplication action (recent regression as part of status update additions) * i18n of `Duplicate` postfix when duplicating rules * Adds success toast when duplication is a success * Enabled `Edit Index Patterns` batch action * Removes unused `Run Rule Manually` action Rule Details Actions: ![image](https://user-images.githubusercontent.com/2946766/72385375-9c3a6880-36dc-11ea-8249-4ae92eb72dd1.png) Edit Index Patterns Batch Action: ![image](https://user-images.githubusercontent.com/2946766/72385468-c5f38f80-36dc-11ea-93c8-b70e4982f01a.png) ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [X] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) - [x] 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/master/packages/kbn-i18n/README.md) - [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
Summary
This PR adds the following actions to the
Rule Details
page via theRuleActionsOverflow
component (which is permission-aware):Additional fixes include:
Duplicate
postfix when duplicating rulesEdit Index Patterns
batch actionRun Rule Manually
actionRule Details Actions:
Edit Index Patterns Batch Action:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Documentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This was checked for breaking API changes and was labeled appropriatelyThis includes a feature addition or change that requires a release note and was labeled appropriately