Skip to content
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

Migrate "Investigate" tab group to new side navigation #102705

Conversation

machadoum
Copy link
Member

@machadoum machadoum commented Jun 21, 2021

Summary

  • Update navigateToApp and getUrlForApp to provide the deepLinkId
  • Update Timelines and Cases routes to start from /timelines and /cases
  • Add Timelines and cases to side nav menu under "Investigate" menu group
  • Delete Timelines and Cases old menu code
  • Fix broken tests

Screenshot 2021-06-22 at 09 58 59

Checklist

@machadoum machadoum force-pushed the security-navigation-investigate-1101 branch from 51c7d7f to 2a84286 Compare June 21, 2021 12:52
@machadoum machadoum marked this pull request as ready for review June 22, 2021 07:57
@machadoum machadoum requested review from a team as code owners June 22, 2021 07:57
@machadoum machadoum requested review from angorayc, semd and cnasikas June 22, 2021 07:57
semd
semd approved these changes Jun 22, 2021
Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

looks good, only the link_to/index.ts needs to be adapted too.

@machadoum machadoum force-pushed the security-navigation-investigate-1101 branch 3 times, most recently from f2a946e to 38f764f Compare June 23, 2021 12:58
@machadoum machadoum force-pushed the security-navigation-investigate-1101 branch from 38f764f to 5a96d85 Compare June 23, 2021 13:20
@machadoum machadoum requested a review from semd June 23, 2021 13:22
@machadoum machadoum force-pushed the security-navigation-investigate-1101 branch from 5a96d85 to 4364968 Compare June 23, 2021 13:44
@machadoum machadoum merged commit 119fdc6 into elastic:security-navigation-1101 Jun 23, 2021
@kibanamachine
Copy link
Contributor

kibanamachine commented Jun 23, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / jest / Jest Tests.x-pack/plugins/security_solution/public/cases/components/use_insert_timeline.useInsertTimeline init

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: "[Test rule](/timelines/?timeline=(id:'ef579e40-jibber-jabber',isOpen:!t))"
Received: "[Test rule](/?timeline=(id:'ef579e40-jibber-jabber',isOpen:!t))"

Number of calls: 1
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/x-pack/plugins/security_solution/public/cases/components/use_insert_timeline/index.test.tsx:67:22)
    at Promise.then.completed (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:276:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:216:10)
    at _callCircusTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:212:40)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at _runTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:149:3)
    at _runTestsForDescribeBlock (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:63:9)
    at _runTestsForDescribeBlock (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:57:9)
    at run (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:176:21)
    at jestAdapter (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:109:19)
    at runTestInternal (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/runTest.js:380:16)
    at runTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/runTest.js:472:34)
    at Object.worker (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/testWorker.js:133:12)

Kibana Pipeline / jest / Jest Tests.x-pack/plugins/security_solution/public/cases/components/use_insert_timeline.useInsertTimeline it appends the value if is not empty

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: "New value [Test rule](/timelines/?timeline=(id:'ef579e40-jibber-jabber',isOpen:!t))"
Received: "New value [Test rule](/?timeline=(id:'ef579e40-jibber-jabber',isOpen:!t))"

Number of calls: 1
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/x-pack/plugins/security_solution/public/cases/components/use_insert_timeline/index.test.tsx:75:22)
    at Promise.then.completed (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:276:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:216:10)
    at _callCircusTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:212:40)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at _runTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:149:3)
    at _runTestsForDescribeBlock (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:63:9)
    at _runTestsForDescribeBlock (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:57:9)
    at run (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:176:21)
    at jestAdapter (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:109:19)
    at runTestInternal (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/runTest.js:380:16)
    at runTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/runTest.js:472:34)
    at Object.worker (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/testWorker.js:133:12)

Kibana Pipeline / jest / Jest Tests.x-pack/plugins/security_solution/public/cases/components/use_insert_timeline.useInsertTimeline calls formatUrl with correct options

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

- Expected
+ Received

- "/timelines/?timeline=(id:'ef579e40-jibber-jabber',isOpen:!t)",
+ "/?timeline=(id:'ef579e40-jibber-jabber',isOpen:!t)",
  {"absolute": true, "skipSearch": true},

Number of calls: 1
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/x-pack/plugins/security_solution/public/cases/components/use_insert_timeline/index.test.tsx:83:23)
    at Promise.then.completed (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:276:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:216:10)
    at _callCircusTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:212:40)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at _runTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:149:3)
    at _runTestsForDescribeBlock (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:63:9)
    at _runTestsForDescribeBlock (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:57:9)
    at run (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:176:21)
    at jestAdapter (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:109:19)
    at runTestInternal (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/runTest.js:380:16)
    at runTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/runTest.js:472:34)
    at Object.worker (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/testWorker.js:133:12)

and 4 more failures, only showing the first 3.

History

  • 💔 Build #133536 failed 38f764fe4a763a78e3498595b0b37acc8165cc35
  • 💔 Build #133546 failed 5a96d85a438b3a2e3741d767e746452e8615d1a2
  • 💔 Build #133452 failed c881defc00889abf15687c588253b5624b01c2d1
  • 💔 Build #133111 failed 6306785426d6be0b5f5978783981357474c79eac

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

michaelolo24 pushed a commit to michaelolo24/kibana that referenced this pull request Jun 23, 2021
* Migrate "Investigate" tab group to new side navigation

It includes:
* Timelines
* Cases

* Quick fix useFormatUrl and HeaderPage navigation
XavierM pushed a commit that referenced this pull request Jun 24, 2021
* Migrate "Investigate" tab group to new side navigation

It includes:
* Timelines
* Cases

* Quick fix useFormatUrl and HeaderPage navigation
semd added a commit that referenced this pull request Jun 29, 2021
* [SecuritySolutions] [Navigation] Prepare new routing and migrate overview (#101733)

* prepare new routing and migrate overview

* test fix and todo comments identified

* telemetry using app views

* navigation groups implemented

* cleaning

* export subplugin routes as route props array

* [Security Solution][Navigation] Migrate Security Solutions 'explore' tab group to deep link navigation (#102306)

* Update navigateToApp and getUrlForApp to provide the deepLinkId
* Update Hosts and Network routes to start from /hosts and /network
* Add Hosts and Network to side nav menu under "Explore" menu group
* Delete Hosts and Network old menu code
* Fix broken tests

* [SecuritySolution] Add detections subplugin to deeplink (#101791)

* prepare new routing and migrate overview

* init nav deeplink

* split detections into rules and alerts

* init exception link

* init detections

* link to rules creation page

* link to rules creation page

* rename detections to alerts

* fix unit tests

* fix rules creation page

* remove console

* fix lint error

* fix unit tests

* fix unit tests

* isolating rules and exceptions page

* replace history push with navigateToApp

* fix unit test

* temporary fix for createCoreStartMock

* update cypress

* skip failing cypress

* skip failing cypress

Co-authored-by: semd <[email protected]>

* Migrate "Investigate" tab group to new side navigation (#102705)

* Migrate "Investigate" tab group to new side navigation

It includes:
* Timelines
* Cases

* Quick fix useFormatUrl and HeaderPage navigation

* [Security Solutions] Management navigation (#102685)

* prepare new routing and migrate overview

* test fix and todo comments identified

* telemetry using app views

* navigation groups implemented

* cleaning

* export subplugin routes as route props array

* breadcrumbs changes and sidenav generation improvements

* jest tests for breadcrumbs and navigation changes

* retrocompatibility for sections that are not yet migrated to deepLinks

* management deepLinks and plugin refactoring

* home navigation changes

* management navigation migrated to deeplinks

* jest tests fixed

* header page back link improved and tests fixed

* type errors fixes

* improve home navigation encapsulation

Co-authored-by: Kibana Machine <[email protected]>

* Fix type checking

* export header page

* fix padding

* add redirect routes

* unskip detection cypress

* fix i18n

* fix create your own rules btn

* fix cancel button on rules creation page

* test fixes

* fix breadcrumbs for rules pages

* unit test fixes

* additional fixes

* [Security Solutions] Navigation usage tracker and general changes (#103271)

* [Security Solutions] use of currentAppId$ migrated. and some small fixes

* unused constants removed

* remove unused constant

* test fix and types

* fix cypress

* fix cypress tests

* Fix case navTab permission and tests

* Revert 'timeline.isOpen' breadcrumb code that was deleted during merge

* Fix useInsertTimeline test by removing '/'

* change global navigation visible deeplinks

* fix /admininstration top level redirect to

* fix global search icon, nav order and overview hosts link

* update start a new case link

* fix rules link in exception list table

* unskip cypress tests

* update rules link

* fix full screen timeline

* fixing broken links and administration telemetry split

* remove unused comments

* remove timeline z-index and cleanup global header component

* some minor fixes

* add unit tests for detections breadcrumbs

* remove case to  global/search nav when cases is none

* rename test scenario

* fix side_panel flyout

* fix cases use cases between search/gobal nav

* timeline snapshot regenerated and cypres test fixed

* rollback management tracking split as it causes unexpected errors on the telemetry component

Co-authored-by: Pablo Machado <[email protected]>
Co-authored-by: Angela Chuang <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Michael Olorunnisola <[email protected]>
Co-authored-by: Angela Chuang <[email protected]>
Co-authored-by: Xavier Mouligneau <[email protected]>
semd added a commit to semd/kibana that referenced this pull request Jun 29, 2021
* [SecuritySolutions] [Navigation] Prepare new routing and migrate overview (elastic#101733)

* prepare new routing and migrate overview

* test fix and todo comments identified

* telemetry using app views

* navigation groups implemented

* cleaning

* export subplugin routes as route props array

* [Security Solution][Navigation] Migrate Security Solutions 'explore' tab group to deep link navigation (elastic#102306)

* Update navigateToApp and getUrlForApp to provide the deepLinkId
* Update Hosts and Network routes to start from /hosts and /network
* Add Hosts and Network to side nav menu under "Explore" menu group
* Delete Hosts and Network old menu code
* Fix broken tests

* [SecuritySolution] Add detections subplugin to deeplink (elastic#101791)

* prepare new routing and migrate overview

* init nav deeplink

* split detections into rules and alerts

* init exception link

* init detections

* link to rules creation page

* link to rules creation page

* rename detections to alerts

* fix unit tests

* fix rules creation page

* remove console

* fix lint error

* fix unit tests

* fix unit tests

* isolating rules and exceptions page

* replace history push with navigateToApp

* fix unit test

* temporary fix for createCoreStartMock

* update cypress

* skip failing cypress

* skip failing cypress

Co-authored-by: semd <[email protected]>

* Migrate "Investigate" tab group to new side navigation (elastic#102705)

* Migrate "Investigate" tab group to new side navigation

It includes:
* Timelines
* Cases

* Quick fix useFormatUrl and HeaderPage navigation

* [Security Solutions] Management navigation (elastic#102685)

* prepare new routing and migrate overview

* test fix and todo comments identified

* telemetry using app views

* navigation groups implemented

* cleaning

* export subplugin routes as route props array

* breadcrumbs changes and sidenav generation improvements

* jest tests for breadcrumbs and navigation changes

* retrocompatibility for sections that are not yet migrated to deepLinks

* management deepLinks and plugin refactoring

* home navigation changes

* management navigation migrated to deeplinks

* jest tests fixed

* header page back link improved and tests fixed

* type errors fixes

* improve home navigation encapsulation

Co-authored-by: Kibana Machine <[email protected]>

* Fix type checking

* export header page

* fix padding

* add redirect routes

* unskip detection cypress

* fix i18n

* fix create your own rules btn

* fix cancel button on rules creation page

* test fixes

* fix breadcrumbs for rules pages

* unit test fixes

* additional fixes

* [Security Solutions] Navigation usage tracker and general changes (elastic#103271)

* [Security Solutions] use of currentAppId$ migrated. and some small fixes

* unused constants removed

* remove unused constant

* test fix and types

* fix cypress

* fix cypress tests

* Fix case navTab permission and tests

* Revert 'timeline.isOpen' breadcrumb code that was deleted during merge

* Fix useInsertTimeline test by removing '/'

* change global navigation visible deeplinks

* fix /admininstration top level redirect to

* fix global search icon, nav order and overview hosts link

* update start a new case link

* fix rules link in exception list table

* unskip cypress tests

* update rules link

* fix full screen timeline

* fixing broken links and administration telemetry split

* remove unused comments

* remove timeline z-index and cleanup global header component

* some minor fixes

* add unit tests for detections breadcrumbs

* remove case to  global/search nav when cases is none

* rename test scenario

* fix side_panel flyout

* fix cases use cases between search/gobal nav

* timeline snapshot regenerated and cypres test fixed

* rollback management tracking split as it causes unexpected errors on the telemetry component

Co-authored-by: Pablo Machado <[email protected]>
Co-authored-by: Angela Chuang <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Michael Olorunnisola <[email protected]>
Co-authored-by: Angela Chuang <[email protected]>
Co-authored-by: Xavier Mouligneau <[email protected]>
semd added a commit that referenced this pull request Jun 29, 2021
* [SecuritySolutions] [Navigation] Prepare new routing and migrate overview (#101733)

* prepare new routing and migrate overview

* test fix and todo comments identified

* telemetry using app views

* navigation groups implemented

* cleaning

* export subplugin routes as route props array

* [Security Solution][Navigation] Migrate Security Solutions 'explore' tab group to deep link navigation (#102306)

* Update navigateToApp and getUrlForApp to provide the deepLinkId
* Update Hosts and Network routes to start from /hosts and /network
* Add Hosts and Network to side nav menu under "Explore" menu group
* Delete Hosts and Network old menu code
* Fix broken tests

* [SecuritySolution] Add detections subplugin to deeplink (#101791)

* prepare new routing and migrate overview

* init nav deeplink

* split detections into rules and alerts

* init exception link

* init detections

* link to rules creation page

* link to rules creation page

* rename detections to alerts

* fix unit tests

* fix rules creation page

* remove console

* fix lint error

* fix unit tests

* fix unit tests

* isolating rules and exceptions page

* replace history push with navigateToApp

* fix unit test

* temporary fix for createCoreStartMock

* update cypress

* skip failing cypress

* skip failing cypress

Co-authored-by: semd <[email protected]>

* Migrate "Investigate" tab group to new side navigation (#102705)

* Migrate "Investigate" tab group to new side navigation

It includes:
* Timelines
* Cases

* Quick fix useFormatUrl and HeaderPage navigation

* [Security Solutions] Management navigation (#102685)

* prepare new routing and migrate overview

* test fix and todo comments identified

* telemetry using app views

* navigation groups implemented

* cleaning

* export subplugin routes as route props array

* breadcrumbs changes and sidenav generation improvements

* jest tests for breadcrumbs and navigation changes

* retrocompatibility for sections that are not yet migrated to deepLinks

* management deepLinks and plugin refactoring

* home navigation changes

* management navigation migrated to deeplinks

* jest tests fixed

* header page back link improved and tests fixed

* type errors fixes

* improve home navigation encapsulation

Co-authored-by: Kibana Machine <[email protected]>

* Fix type checking

* export header page

* fix padding

* add redirect routes

* unskip detection cypress

* fix i18n

* fix create your own rules btn

* fix cancel button on rules creation page

* test fixes

* fix breadcrumbs for rules pages

* unit test fixes

* additional fixes

* [Security Solutions] Navigation usage tracker and general changes (#103271)

* [Security Solutions] use of currentAppId$ migrated. and some small fixes

* unused constants removed

* remove unused constant

* test fix and types

* fix cypress

* fix cypress tests

* Fix case navTab permission and tests

* Revert 'timeline.isOpen' breadcrumb code that was deleted during merge

* Fix useInsertTimeline test by removing '/'

* change global navigation visible deeplinks

* fix /admininstration top level redirect to

* fix global search icon, nav order and overview hosts link

* update start a new case link

* fix rules link in exception list table

* unskip cypress tests

* update rules link

* fix full screen timeline

* fixing broken links and administration telemetry split

* remove unused comments

* remove timeline z-index and cleanup global header component

* some minor fixes

* add unit tests for detections breadcrumbs

* remove case to  global/search nav when cases is none

* rename test scenario

* fix side_panel flyout

* fix cases use cases between search/gobal nav

* timeline snapshot regenerated and cypres test fixed

* rollback management tracking split as it causes unexpected errors on the telemetry component

Co-authored-by: Pablo Machado <[email protected]>
Co-authored-by: Angela Chuang <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Michael Olorunnisola <[email protected]>
Co-authored-by: Angela Chuang <[email protected]>
Co-authored-by: Xavier Mouligneau <[email protected]>

Co-authored-by: Pablo Machado <[email protected]>
Co-authored-by: Angela Chuang <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Michael Olorunnisola <[email protected]>
Co-authored-by: Angela Chuang <[email protected]>
Co-authored-by: Xavier Mouligneau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants