Skip to content

[7.x] [SIEM] Move Timeline Template field to first step of rule creation (#60840)#61014

Merged
rylnd merged 1 commit intoelastic:7.xfrom
rylnd:backport/7.x/pr-60840
Mar 24, 2020
Merged

[7.x] [SIEM] Move Timeline Template field to first step of rule creation (#60840)#61014
rylnd merged 1 commit intoelastic:7.xfrom
rylnd:backport/7.x/pr-60840

Conversation

@rylnd
Copy link
Copy Markdown
Contributor

@rylnd rylnd commented Mar 23, 2020

Backports the following commits to 7.x:

…lastic#60840)

* Move timeline template to Define step of Rule creation

This required a refactor/simplification of the step_define_rule logic to
make things work. In retrospect I think that the issue was we were not
handling incoming `defaultValues` props well, which was causing local
component state to be lost.

Now that we're doing a merge and removed a few unneeded local useStates,
things are a) working and b) cleaner

* Fix Rule details/edit view with updated data

We need to fix the other side of the equation to get these to work: the
timeline data was moved to a different step during creation, but when
viewing on the frontend we split the rule data back into the separate
"steps."

* Remove unused import

* Fix bug in formatDefineStepData

I neglected to pass through index in a previous commit.

* Update tests now that timeline has movied to a different step

* Fix more tests

* Update StepRuleDescription snapshots

* Fix cypress Rule Creation test

Timeline template moved, and so tests broke.

* Add unit tests for filterRuleFieldsForType
@rylnd rylnd added the backport This PR is a backport of another PR label Mar 23, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@rylnd rylnd merged commit e76ad68 into elastic:7.x Mar 24, 2020
@rylnd rylnd deleted the backport/7.x/pr-60840 branch March 24, 2020 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants