Skip to content

Commit

Permalink
[8.15] [Security Solution] Copies over settings from timeline template (
Browse files Browse the repository at this point in the history
#190511) (#190530)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Security Solution] Copies over settings from timeline template
(#190511)](#190511)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jatin
Kathuria","email":"jatin.kathuria@elastic.co"},"sourceCommit":{"committedDate":"2024-08-14T16:27:14Z","message":"[Security
Solution] Copies over settings from timeline template (#190511)\n\n##
Summary\r\n\r\nHandles :
https://github.com/elastic/kibana/issues/189992\r\n\r\nWhen user had
created a timeline template and attached it to the rule,\r\nthe columns
were not being copied over from template to the timeline\r\ncreated from
the alert generated by same rule.\r\n\r\nThis PR fixes that as shown in
demo below :
\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4237672e-943a-43f9-b160-5449399a5fd8\r\n\r\n>
[!Caution]\r\n> This PR checks below objects that are needed to be
copied over from\r\ntemplate\r\n> - columns\r\n> - data
providers\r\n>\r\n> If we think, more things should be copied over,
please comment below.\r\n\r\n## Test
Results\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ad527eda-a1c2-49f0-bcfe-0ea449c29b34)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a13f8d983c38736478f2430efa090fedb1c50784","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Threat
Hunting:Investigations","backport:prev-minor","v8.16.0","v8.15.1"],"title":"[Security
Solution] Copies over settings from timeline
template","number":190511,"url":"https://github.com/elastic/kibana/pull/190511","mergeCommit":{"message":"[Security
Solution] Copies over settings from timeline template (#190511)\n\n##
Summary\r\n\r\nHandles :
https://github.com/elastic/kibana/issues/189992\r\n\r\nWhen user had
created a timeline template and attached it to the rule,\r\nthe columns
were not being copied over from template to the timeline\r\ncreated from
the alert generated by same rule.\r\n\r\nThis PR fixes that as shown in
demo below :
\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4237672e-943a-43f9-b160-5449399a5fd8\r\n\r\n>
[!Caution]\r\n> This PR checks below objects that are needed to be
copied over from\r\ntemplate\r\n> - columns\r\n> - data
providers\r\n>\r\n> If we think, more things should be copied over,
please comment below.\r\n\r\n## Test
Results\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ad527eda-a1c2-49f0-bcfe-0ea449c29b34)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a13f8d983c38736478f2430efa090fedb1c50784"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190511","number":190511,"mergeCommit":{"message":"[Security
Solution] Copies over settings from timeline template (#190511)\n\n##
Summary\r\n\r\nHandles :
https://github.com/elastic/kibana/issues/189992\r\n\r\nWhen user had
created a timeline template and attached it to the rule,\r\nthe columns
were not being copied over from template to the timeline\r\ncreated from
the alert generated by same rule.\r\n\r\nThis PR fixes that as shown in
demo below :
\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4237672e-943a-43f9-b160-5449399a5fd8\r\n\r\n>
[!Caution]\r\n> This PR checks below objects that are needed to be
copied over from\r\ntemplate\r\n> - columns\r\n> - data
providers\r\n>\r\n> If we think, more things should be copied over,
please comment below.\r\n\r\n## Test
Results\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ad527eda-a1c2-49f0-bcfe-0ea449c29b34)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a13f8d983c38736478f2430efa090fedb1c50784"}},{"branch":"8.15","label":"v8.15.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jatin Kathuria <jatin.kathuria@elastic.co>
  • Loading branch information
kibanamachine and logeekal authored Aug 14, 2024
1 parent efc63b2 commit f0c5801
Show file tree
Hide file tree
Showing 3 changed files with 332 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,9 @@ export const sendAlertToTimelineAction = async ({
});
}
}
} catch {
} catch (error) {
/* eslint-disable-next-line no-console */
console.error(error);
updateTimelineIsLoading({ id: TimelineId.active, isLoading: false });
return createTimeline({
from,
Expand Down
Loading

0 comments on commit f0c5801

Please sign in to comment.