Skip to content

[Security Solution] add highlighted fields to overview tab#153074

Merged
PhilippeOberti merged 2 commits intomainfrom
expanded-flyout-6070
Mar 21, 2023
Merged

[Security Solution] add highlighted fields to overview tab#153074
PhilippeOberti merged 2 commits intomainfrom
expanded-flyout-6070

Conversation

@PhilippeOberti
Copy link
Copy Markdown
Contributor

@PhilippeOberti PhilippeOberti commented Mar 10, 2023

Summary

This PR leverages the work done in a previous PR and add the Highlighted Fields section under the overview tab of the Security Solution expandable flyout right section panel:

  • the highlighted fields section is displayed at the top of the overview tab. It reuses the AlertSummaryView component
  • displays an empty component if the dataFormattedForFieldBrowser or browserFields are null

How to test

  • add xpack.securitySolution.enableExperimental: ['securityFlyoutEnabled'] to the kibana.json file
  • run yarn es snapshot --license trial, yarn test:generate and yarn start --no-base-path
  • go to the Alerts page, and click on the expand detail button on any row of the table
  • navigate to the Overview tab

Run tests and storybook

  • node scripts/storybook security_solution to run Storybook
  • npm run test:jest --config ./x-pack/plugins/security_solution/public/flyout to run the unit tests
  • yarn cypress:open-as-ci but note that the integration/e2e tests have been written but are now skipped because the feature is protected behind a feature flag, disabled by default. To check them, add 'securityFlyoutEnabled' here

Notes:

  • the expandable flyout right section skeleton work needs to be merged first
  • integration/e2e tests have been written but are now skipped because the feature is protected behind a feature flag, disabled by default. To check them, add 'securityFlyoutEnabled' here
Screen.Recording.2023-03-09.at.8.43.57.PM.mov

https://github.com/elastic/security-team/issues/6070

Checklist

Delete any items that are not applicable to this PR.

@PhilippeOberti PhilippeOberti marked this pull request as ready for review March 10, 2023 23:04
@PhilippeOberti PhilippeOberti requested review from a team as code owners March 10, 2023 23:04
@PhilippeOberti PhilippeOberti added Team:Threat Hunting Security Solution Threat Hunting Team release_note:feature Makes this part of the condensed release notes Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team v8.8.0 labels Mar 10, 2023
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

Copy link
Copy Markdown
Contributor

@lgestc lgestc left a comment

Choose a reason for hiding this comment

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

lgtm, I think you missed that TODO I commented on:)


// TODO enable when the table tab PR is merged
// https://github.com/elastic/kibana/pull/152303
it.skip('should navigate to table tab when clicking on highlighted fields view button', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hey, its merged 🐍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes that's correct, skip removed!

Comment on lines +41 to +50
const { getByTestId } = render(
<ThemeProvider theme={mockTheme}>
<ExpandableFlyoutContext.Provider value={flyoutContextValue}>
<RightPanelContext.Provider value={panelContextValue}>
<HighlightedFields />
</RightPanelContext.Provider>
</ExpandableFlyoutContext.Provider>
</ThemeProvider>
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just a nitpick but maybe this can be extracted into some helper on top of this file, looks like it only changes a little bit in between tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that's a good point! To not slow down development (there is still a lot to do) I logged a tech debt ticket for this (I also have one for some Storybook cleanup)

@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Tests #2 / Bulk editing index patterns of rules with index patterns and rules with a data view Add index patterns to custom rules: one rule is updated, one rule is skipped

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 3789 3790 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 15.8MB 15.8MB +5.3KB
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 513 516 +3

History

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

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

Labels

backport:skip This PR does not require backporting release_note:feature Makes this part of the condensed release notes Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team Team:Threat Hunting Security Solution Threat Hunting Team v8.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants