-
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
[Security Solution] Deletes Old Timeline Code #196243
Conversation
…#195959) ## Summary Handles elastic/security-team#9645 Follow Up PR for removal of Old timeline Code : #196243 - This PR removes `unifiedComponentsInTimelineDisabled` flag. What this means that that unified components in Timeline are now enabled by default. - Consequently, the old timeline table code becomes obsolete and is also removed. ( #196243) ## Changes 1. Converted all cypress and jest tests that were testing old Timeline table to test new unified components in Timeline. If the test for new timeline already existed, old tests are also removed.
…elastic#195959) ## Summary Handles elastic/security-team#9645 Follow Up PR for removal of Old timeline Code : elastic#196243 - This PR removes `unifiedComponentsInTimelineDisabled` flag. What this means that that unified components in Timeline are now enabled by default. - Consequently, the old timeline table code becomes obsolete and is also removed. ( elastic#196243) ## Changes 1. Converted all cypress and jest tests that were testing old Timeline table to test new unified components in Timeline. If the test for new timeline already existed, old tests are also removed. (cherry picked from commit c41178d)
…elastic#195959) ## Summary Handles elastic/security-team#9645 Follow Up PR for removal of Old timeline Code : elastic#196243 - This PR removes `unifiedComponentsInTimelineDisabled` flag. What this means that that unified components in Timeline are now enabled by default. - Consequently, the old timeline table code becomes obsolete and is also removed. ( elastic#196243) ## Changes 1. Converted all cypress and jest tests that were testing old Timeline table to test new unified components in Timeline. If the test for new timeline already existed, old tests are also removed. (cherry picked from commit c41178d)
…abled` flag (#195959) (#197693) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag (#195959)](#195959) <!--- 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-10-24T16:41:19Z","message":"[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag (#195959)\n\n## Summary\r\n\r\nHandles https://github.com/elastic/security-team/issues/9645\r\n\r\nFollow Up PR for removal of Old timeline Code :\r\nhttps://github.com//pull/196243\r\n\r\n- This PR removes `unifiedComponentsInTimelineDisabled` flag. What this\r\nmeans that that unified components in Timeline are now enabled by\r\ndefault.\r\n\r\n- Consequently, the old timeline table code becomes obsolete and is also\r\nremoved. ( https://github.com/elastic/kibana/pull/196243)\r\n\r\n## Changes\r\n\r\n1. Converted all cypress and jest tests that were testing old Timeline\r\ntable to test new unified components in Timeline. If the test for new\r\ntimeline already existed, old tests are also removed.","sha":"c41178d2d6e952798548ccd7db691d5ceff62053","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat Hunting:Investigations","v8.16.0"],"title":"[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag","number":195959,"url":"https://github.com/elastic/kibana/pull/195959","mergeCommit":{"message":"[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag (#195959)\n\n## Summary\r\n\r\nHandles https://github.com/elastic/security-team/issues/9645\r\n\r\nFollow Up PR for removal of Old timeline Code :\r\nhttps://github.com//pull/196243\r\n\r\n- This PR removes `unifiedComponentsInTimelineDisabled` flag. What this\r\nmeans that that unified components in Timeline are now enabled by\r\ndefault.\r\n\r\n- Consequently, the old timeline table code becomes obsolete and is also\r\nremoved. ( https://github.com/elastic/kibana/pull/196243)\r\n\r\n## Changes\r\n\r\n1. Converted all cypress and jest tests that were testing old Timeline\r\ntable to test new unified components in Timeline. If the test for new\r\ntimeline already existed, old tests are also removed.","sha":"c41178d2d6e952798548ccd7db691d5ceff62053"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195959","number":195959,"mergeCommit":{"message":"[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag (#195959)\n\n## Summary\r\n\r\nHandles https://github.com/elastic/security-team/issues/9645\r\n\r\nFollow Up PR for removal of Old timeline Code :\r\nhttps://github.com//pull/196243\r\n\r\n- This PR removes `unifiedComponentsInTimelineDisabled` flag. What this\r\nmeans that that unified components in Timeline are now enabled by\r\ndefault.\r\n\r\n- Consequently, the old timeline table code becomes obsolete and is also\r\nremoved. ( https://github.com/elastic/kibana/pull/196243)\r\n\r\n## Changes\r\n\r\n1. Converted all cypress and jest tests that were testing old Timeline\r\ntable to test new unified components in Timeline. If the test for new\r\ntimeline already existed, old tests are also removed.","sha":"c41178d2d6e952798548ccd7db691d5ceff62053"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jatin Kathuria <jatin.kathuria@elastic.co>
…sabled` flag (#195959) (#197692) # Backport This will backport the following commits from `main` to `8.16`: - [[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag (#195959)](#195959) <!--- 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-10-24T16:41:19Z","message":"[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag (#195959)\n\n## Summary\r\n\r\nHandles https://github.com/elastic/security-team/issues/9645\r\n\r\nFollow Up PR for removal of Old timeline Code :\r\nhttps://github.com//pull/196243\r\n\r\n- This PR removes `unifiedComponentsInTimelineDisabled` flag. What this\r\nmeans that that unified components in Timeline are now enabled by\r\ndefault.\r\n\r\n- Consequently, the old timeline table code becomes obsolete and is also\r\nremoved. ( https://github.com/elastic/kibana/pull/196243)\r\n\r\n## Changes\r\n\r\n1. Converted all cypress and jest tests that were testing old Timeline\r\ntable to test new unified components in Timeline. If the test for new\r\ntimeline already existed, old tests are also removed.","sha":"c41178d2d6e952798548ccd7db691d5ceff62053","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat Hunting:Investigations","v8.16.0"],"title":"[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag","number":195959,"url":"https://github.com/elastic/kibana/pull/195959","mergeCommit":{"message":"[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag (#195959)\n\n## Summary\r\n\r\nHandles https://github.com/elastic/security-team/issues/9645\r\n\r\nFollow Up PR for removal of Old timeline Code :\r\nhttps://github.com//pull/196243\r\n\r\n- This PR removes `unifiedComponentsInTimelineDisabled` flag. What this\r\nmeans that that unified components in Timeline are now enabled by\r\ndefault.\r\n\r\n- Consequently, the old timeline table code becomes obsolete and is also\r\nremoved. ( https://github.com/elastic/kibana/pull/196243)\r\n\r\n## Changes\r\n\r\n1. Converted all cypress and jest tests that were testing old Timeline\r\ntable to test new unified components in Timeline. If the test for new\r\ntimeline already existed, old tests are also removed.","sha":"c41178d2d6e952798548ccd7db691d5ceff62053"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195959","number":195959,"mergeCommit":{"message":"[Security Solution] Remove `unifiedComponentsInTimelineDisabled` flag (#195959)\n\n## Summary\r\n\r\nHandles https://github.com/elastic/security-team/issues/9645\r\n\r\nFollow Up PR for removal of Old timeline Code :\r\nhttps://github.com//pull/196243\r\n\r\n- This PR removes `unifiedComponentsInTimelineDisabled` flag. What this\r\nmeans that that unified components in Timeline are now enabled by\r\ndefault.\r\n\r\n- Consequently, the old timeline table code becomes obsolete and is also\r\nremoved. ( https://github.com/elastic/kibana/pull/196243)\r\n\r\n## Changes\r\n\r\n1. Converted all cypress and jest tests that were testing old Timeline\r\ntable to test new unified components in Timeline. If the test for new\r\ntimeline already existed, old tests are also removed.","sha":"c41178d2d6e952798548ccd7db691d5ceff62053"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jatin Kathuria <jatin.kathuria@elastic.co>
37e7723
to
4ab5f0b
Compare
* 2.0. | ||
*/ | ||
|
||
import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; |
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.
This is a utility that was part of on of the deleted file but is required at other places as well so moved here.
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.
Done in 8ec47e8
@@ -282,3 +282,14 @@ export const TIMELINE_FILTER_DROP_AREA = 'timeline-filter-drop-area'; | |||
|
|||
export const getNonDropAreaFilters = (filters: Filter[] = []) => | |||
filters.filter((f: Filter) => f.meta.controlledBy !== TIMELINE_FILTER_DROP_AREA); | |||
|
|||
export const isFullScreen = ({ |
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.
This is a utility that was part of on of the deleted file but is required at other places as well so moved here.
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.
could maybe add a couple of unit tests for it, even though it's super simple?
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.
Done here : f8a4121
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
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.
left a couple of comments for adding unit tests, about to pull down the branch and test things, will approve once desk testing is done
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.
what do you think about writing some basic unit tests for the 2 methods here?
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.
Good point. Should not have missed that. Will add those.
@@ -282,3 +282,14 @@ export const TIMELINE_FILTER_DROP_AREA = 'timeline-filter-drop-area'; | |||
|
|||
export const getNonDropAreaFilters = (filters: Filter[] = []) => | |||
filters.filter((f: Filter) => f.meta.controlledBy !== TIMELINE_FILTER_DROP_AREA); | |||
|
|||
export const isFullScreen = ({ |
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.
could maybe add a couple of unit tests for it, even though it's super simple?
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 adding the tests. I did some smoke testing and everything looks good. Such a cool PR, over 7k lines removed, LOVE IT!
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11721344293 |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
|
## Summary Fixes elastic/security-team#9676 This is follow up of the PR : elastic#195959 where we had removed feature flag `unifiedComponentsInTimelineDisabled`. This PR completes unified components migration in Timeline. ## Changes Most changes in this PR are : 1. Deletion for the obsolete code. 2. Refactoring of needed utils ( only 3. have marked in comments below ) 3. Updating import path of above utils. (cherry picked from commit c9d167f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Deletes Old Timeline Code (#196243)](#196243) <!--- 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-11-07T10:39:55Z","message":"[Security Solution] Deletes Old Timeline Code (#196243)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/security-team/issues/9676\r\n\r\nThis is follow up of the PR :\r\nhttps://github.com//pull/195959 where we had removed\r\nfeature flag `unifiedComponentsInTimelineDisabled`.\r\n\r\nThis PR completes unified components migration in Timeline. \r\n\r\n## Changes\r\n\r\nMost changes in this PR are : \r\n\r\n1. Deletion for the obsolete code.\r\n2. Refactoring of needed utils ( only 3. have marked in comments below )\r\n3. Updating import path of above utils.","sha":"c9d167f1ab584c315f820dc94ba2d51864d508f4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat Hunting:Investigations","v8.17.0"],"title":"[Security Solution] Deletes Old Timeline Code","number":196243,"url":"https://github.com/elastic/kibana/pull/196243","mergeCommit":{"message":"[Security Solution] Deletes Old Timeline Code (#196243)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/security-team/issues/9676\r\n\r\nThis is follow up of the PR :\r\nhttps://github.com//pull/195959 where we had removed\r\nfeature flag `unifiedComponentsInTimelineDisabled`.\r\n\r\nThis PR completes unified components migration in Timeline. \r\n\r\n## Changes\r\n\r\nMost changes in this PR are : \r\n\r\n1. Deletion for the obsolete code.\r\n2. Refactoring of needed utils ( only 3. have marked in comments below )\r\n3. Updating import path of above utils.","sha":"c9d167f1ab584c315f820dc94ba2d51864d508f4"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196243","number":196243,"mergeCommit":{"message":"[Security Solution] Deletes Old Timeline Code (#196243)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/security-team/issues/9676\r\n\r\nThis is follow up of the PR :\r\nhttps://github.com//pull/195959 where we had removed\r\nfeature flag `unifiedComponentsInTimelineDisabled`.\r\n\r\nThis PR completes unified components migration in Timeline. \r\n\r\n## Changes\r\n\r\nMost changes in this PR are : \r\n\r\n1. Deletion for the obsolete code.\r\n2. Refactoring of needed utils ( only 3. have marked in comments below )\r\n3. Updating import path of above utils.","sha":"c9d167f1ab584c315f820dc94ba2d51864d508f4"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jatin Kathuria <jatin.kathuria@elastic.co>
## Summary Fixes elastic/security-team#9676 This is follow up of the PR : elastic#195959 where we had removed feature flag `unifiedComponentsInTimelineDisabled`. This PR completes unified components migration in Timeline. ## Changes Most changes in this PR are : 1. Deletion for the obsolete code. 2. Refactoring of needed utils ( only 3. have marked in comments below ) 3. Updating import path of above utils.
Summary
Fixes https://github.com/elastic/security-team/issues/9676
This is follow up of the PR : #195959 where we had removed feature flag
unifiedComponentsInTimelineDisabled
.This PR completes unified components migration in Timeline.
Changes
Most changes in this PR are :