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

[Security Solution] integrate CellActions in Events/Alerts DataTables #149934

Merged
merged 31 commits into from
Feb 13, 2023

Conversation

semd
Copy link
Contributor

@semd semd commented Jan 31, 2023

issue: #145666

Summary

Migrate DataTable component, used to render the alerts/events data grids in different pages: Alerts, Explore pages (Hosts, Users, Network), and also Rule preview. In summary, all data grids but Timeline.

The integration won't modify any action or change any functionality, everything is supposed to keep working the same way from the User's perspective. But it has a minor UI update in the actions tooltip layout:

old
old

new
new

This change was needed since the custom tooltip (old one) was adding too many Security-related customizations to the generic EuiDataGrid's columnCellActions, and also it had a lot of "action-specific" complexity, which is against the idea of having an action-agnostic generic component, to begin with.
So, in order to unify the CellActions user experience (icon, text, layout...), we needed to use a more uniformed component, that will render all the actions without any special case.

@semd semd added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Explore 8.7 candidate labels Jan 31, 2023
@semd semd self-assigned this Jan 31, 2023
@semd semd changed the title [Security Solution] integrate CellActions in DataTables [Security Solution] integrate CellActions in Events/Alerts DataTables Jan 31, 2023
@semd semd marked this pull request as ready for review January 31, 2023 17:04
@semd semd requested review from a team as code owners January 31, 2023 17:04
@elasticmachine
Copy link
Contributor

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

Copy link
Member

@machadoum machadoum left a comment

Choose a reason for hiding this comment

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

Hey Sergi, Good work!

useDataGridColumnsCellActions usage looks simple and clear. 👏

I noticed a minor issue on show_top_n could you take a look?

Copy link
Contributor

@e40pud e40pud left a comment

Choose a reason for hiding this comment

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

LGTM

@semd
Copy link
Contributor Author

semd commented Feb 6, 2023

@elasticmachine merge upstream

visibleCellActions: 3,
}
: {}),
cellActions: columnsCellActions[columnIndex] ?? [],
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the beauty - how simpler it is now!

@@ -569,17 +566,15 @@ const StatefulEventsViewerComponent: React.FC<EventsViewerProps & PropsFromRedux
unitCountText={unitCountText}
browserFields={browserFields}
data={nonDeletedEvents}
disabledCellActions={FIELDS_WITHOUT_CELL_ACTIONS}
disableCellActions={disableCellActions}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should also remove file x-pack/plugins/security_solution/public/common/lib/cell_actions/constants.ts because its FIELDS_WITHOUT_CELL_ACTIONS is not in use any more

Copy link
Contributor

@YulNaumenko YulNaumenko left a comment

Choose a reason for hiding this comment

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

LGTM! Great work!
I found the issue for flyout showTopN functionality not displayed, but this is happening in the main as well, so not related to the PR.

@semd semd added v8.8.0 and removed 8.7 candidate labels Feb 7, 2023
@semd
Copy link
Contributor Author

semd commented Feb 8, 2023

@elasticmachine merge upstream

@semd
Copy link
Contributor Author

semd commented Feb 9, 2023

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #29 / cases security and spaces enabled: trial push_case memoryless server alerts should change the status of all alerts attached to a case to closed when closure_type: close-by-pushing and syncAlerts: true

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 3721 3712 -9

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/cell-actions 14 15 +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 13.8MB 13.8MB -27.8KB

History

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

cc @semd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants