Skip to content

Conversation

@patrykkopycinski
Copy link
Contributor

@patrykkopycinski patrykkopycinski commented May 7, 2020

Summary

This PR introduces a new type of timeline: draft, which will be used for temporary timeline investigations and is going to reduce amount of Untitled Timelines.

With these changes, if the user would like to keep the timeline investigation he has to put the title to the timeline, otherwise, he risks that the timeline data is going to be erased, as we are going to reuse the same draft timeline instance.

Changes in the PR:

  1. Added REST urls for retrieving and resetting draft timeline:
  • GET /api/timeline/_draft to retrieve the draft timeline
  • POST /api/timeline/_draf/clean to reset the draft timeline
  1. Updated import/export REST logic when importing/exporting draft timelines
  • when the draft timeline is exported the timelineType will be changed to default (as regular timelines)
  • when the draft timeline is imported the timelineType will be changed to default (as regular timelines)

Untitled_ May 6, 2020 2_27 PM (2)

Checklist

@patrykkopycinski
Copy link
Contributor Author

@elasticmachine merge upstream

@patrykkopycinski
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested locally and it does run smoothly!!!

BIG LGTM, thank you for refactoring and simplify your PR.

@patrykkopycinski
Copy link
Contributor Author

@elasticmachine merge upstream

@patrykkopycinski
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

merge conflict between base and head

…itled-timeline

# Conflicts:
#	x-pack/plugins/siem/public/components/open_timeline/helpers.test.ts
#	x-pack/plugins/siem/public/components/open_timeline/index.test.tsx
#	x-pack/plugins/siem/public/components/open_timeline/open_timeline.tsx
#	x-pack/plugins/siem/public/components/open_timeline/types.ts
#	x-pack/plugins/siem/public/components/top_n/index.test.tsx
#	x-pack/plugins/siem/public/containers/timeline/api.ts
#	x-pack/plugins/siem/public/mock/timeline_results.ts
#	x-pack/plugins/siem/public/pages/timelines/index.tsx
#	x-pack/plugins/siem/public/store/timeline/defaults.ts
#	x-pack/plugins/siem/public/store/timeline/epic.ts
#	x-pack/plugins/siem/public/store/timeline/model.ts
@patrykkopycinski
Copy link
Contributor Author

@elasticmachine merge upstream

@patrykkopycinski patrykkopycinski marked this pull request as ready for review May 13, 2020 13:59
@patrykkopycinski patrykkopycinski requested review from a team as code owners May 13, 2020 13:59
@patrykkopycinski patrykkopycinski changed the title Feat/siem untitled timeline [SIEM] Eliminate Superfluous Untitled Timelines May 13, 2020
@patrykkopycinski
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@patrykkopycinski patrykkopycinski merged commit 65a0b44 into elastic:master May 13, 2020
@patrykkopycinski patrykkopycinski deleted the feat/siem-untitled-timeline branch May 13, 2020 20:05
patrykkopycinski added a commit to patrykkopycinski/kibana that referenced this pull request May 13, 2020
# Conflicts:
#	x-pack/plugins/siem/public/common/components/top_n/index.test.tsx
#	x-pack/plugins/siem/public/common/mock/timeline_results.ts
#	x-pack/plugins/siem/public/timelines/components/open_timeline/helpers.test.ts
#	x-pack/plugins/siem/public/timelines/components/open_timeline/index.test.tsx
#	x-pack/plugins/siem/public/timelines/components/open_timeline/open_timeline.tsx
#	x-pack/plugins/siem/public/timelines/components/open_timeline/types.ts
#	x-pack/plugins/siem/public/timelines/containers/api.ts
#	x-pack/plugins/siem/public/timelines/pages/index.tsx
#	x-pack/plugins/siem/public/timelines/store/timeline/defaults.ts
#	x-pack/plugins/siem/public/timelines/store/timeline/epic.ts
#	x-pack/plugins/siem/public/timelines/store/timeline/model.ts
#	yarn.lock
patrykkopycinski added a commit to patrykkopycinski/kibana that referenced this pull request May 13, 2020
# Conflicts:
#	x-pack/plugins/siem/public/common/components/top_n/index.test.tsx
#	x-pack/plugins/siem/public/common/mock/timeline_results.ts
#	x-pack/plugins/siem/public/timelines/components/open_timeline/helpers.test.ts
#	x-pack/plugins/siem/public/timelines/components/open_timeline/index.test.tsx
#	x-pack/plugins/siem/public/timelines/components/open_timeline/open_timeline.tsx
#	x-pack/plugins/siem/public/timelines/components/open_timeline/types.ts
#	x-pack/plugins/siem/public/timelines/containers/api.ts
#	x-pack/plugins/siem/public/timelines/pages/index.tsx
#	x-pack/plugins/siem/public/timelines/store/timeline/defaults.ts
#	x-pack/plugins/siem/public/timelines/store/timeline/epic.ts
#	x-pack/plugins/siem/public/timelines/store/timeline/model.ts
#	yarn.lock
XavierM pushed a commit that referenced this pull request May 14, 2020
* [SIEM] Eliminate Superfluous Untitled Timelines (#65783)

# Conflicts:
#	x-pack/plugins/siem/public/common/components/top_n/index.test.tsx
#	x-pack/plugins/siem/public/common/mock/timeline_results.ts
#	x-pack/plugins/siem/public/timelines/components/open_timeline/helpers.test.ts
#	x-pack/plugins/siem/public/timelines/components/open_timeline/index.test.tsx
#	x-pack/plugins/siem/public/timelines/components/open_timeline/open_timeline.tsx
#	x-pack/plugins/siem/public/timelines/components/open_timeline/types.ts
#	x-pack/plugins/siem/public/timelines/containers/api.ts
#	x-pack/plugins/siem/public/timelines/pages/index.tsx
#	x-pack/plugins/siem/public/timelines/store/timeline/defaults.ts
#	x-pack/plugins/siem/public/timelines/store/timeline/epic.ts
#	x-pack/plugins/siem/public/timelines/store/timeline/model.ts
#	yarn.lock

* fix lock

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
XavierM pushed a commit that referenced this pull request May 14, 2020
* [SIEM] Eliminate Superfluous Untitled Timelines (#65783)

# Conflicts:
#	x-pack/plugins/siem/public/common/components/top_n/index.test.tsx
#	x-pack/plugins/siem/public/common/mock/timeline_results.ts
#	x-pack/plugins/siem/public/timelines/components/open_timeline/helpers.test.ts
#	x-pack/plugins/siem/public/timelines/components/open_timeline/index.test.tsx
#	x-pack/plugins/siem/public/timelines/components/open_timeline/open_timeline.tsx
#	x-pack/plugins/siem/public/timelines/components/open_timeline/types.ts
#	x-pack/plugins/siem/public/timelines/containers/api.ts
#	x-pack/plugins/siem/public/timelines/pages/index.tsx
#	x-pack/plugins/siem/public/timelines/store/timeline/defaults.ts
#	x-pack/plugins/siem/public/timelines/store/timeline/epic.ts
#	x-pack/plugins/siem/public/timelines/store/timeline/model.ts
#	yarn.lock

* fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants