-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[RAC] [TGrid] Field browser implemented in EuiDataGrid toolbar #105207
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
@elasticmachine merge upstream |
@elastic/kibana-operations I had to increase the limit of the master:
timeline-euidatagrid branch:
The total net size increase is around 21 K, which is caused by a couple of files that I had to duplicate, but they will be removed in following PRs. |
Can design get some instructions on how to check this PR? The screen shows obs, so I'm guessing I need to turn on a feature flag somewhere? Couple quick notes just from browsing the code / looking at the screens:
|
Hello @snide, I updated the description explaining how to test it in Security Solutions. In Observalibity it is not possible until this pr #106199 is merged. Regarding the notes: We can talk about a redesign to make it more aligned with the rest of popovers/modals, but right now it is just a port from one plugin to the other, I tried to keep the same UI as there was no design enhancement planned. About the EUI column manager. It will be used only for column order, which is the only action that Field Browser does not implement right now. The column manager "hide/show" action is disabled by config, so there's no functionality overlap using both of them. Thanks for the observations. |
@@ -257,6 +257,7 @@ export const defaultTimelineToTimelineModel = ( | |||
const timelineEntries = { | |||
...timeline, | |||
columns: timeline.columns != null ? timeline.columns.map(setTimelineColumn) : defaultHeaders, | |||
defaultColumns: defaultHeaders, |
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 was needed in order to reset the columns in the timeline page property, if not defined the reset action updates to empty columns.
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 also resolves @andrew-goldstein comment #105207 (review)
@@ -23,17 +23,19 @@ export const getColumnHeaders = ( | |||
headers: ColumnHeaderOptions[], | |||
browserFields: BrowserFields | |||
): ColumnHeaderOptions[] => { | |||
return headers.map((header) => { | |||
const splitHeader = header.id.split('.'); // source.geo.city_name -> [source, geo, city_name] | |||
return headers |
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.
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: |
@@ -107,7 +107,7 @@ pageLoadAssetSize: | |||
dataVisualizer: 27530 | |||
banners: 17946 | |||
mapsEms: 26072 | |||
timelines: 251886 | |||
timelines: 330000 |
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.
I don't like how big this is getting, but between #105941 and #105207 (comment) I understand this is just some debt we're taking on temporarily.
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.
Exactly, thanks
💔 Backport failed
Successful backport PRs will be merged automatically after passing CI. To backport manually run: |
…ic#105207) * tGid header using EuiDataGrid * useFetchIndex migrated and column_headers refactor * removed useless mock * add badges translations * i18n translations keys fixed * code format * filter default columns not present in field browser * reset button to initial columns * cleaning * dependencies moved * fix functional test with missing data service * remove unused code (unrelated) * fieldBrowser integration with security solutions timeline * lint and translations cleaned * timeline toolbar removed for merge & some test fixes * type fix * type fixes * timeline static default colums * limit size temporary increase * limit size temporary increase Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…) (#106278) * tGid header using EuiDataGrid * useFetchIndex migrated and column_headers refactor * removed useless mock * add badges translations * i18n translations keys fixed * code format * filter default columns not present in field browser * reset button to initial columns * cleaning * dependencies moved * fix functional test with missing data service * remove unused code (unrelated) * fieldBrowser integration with security solutions timeline * lint and translations cleaned * timeline toolbar removed for merge & some test fixes * type fix * type fixes * timeline static default colums * limit size temporary increase * limit size temporary increase Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
…enshots below: ![o11y_alerts](https://user-images.githubusercontent.com/4459398/126273572-7e02e3b1-c075-4b1a-9b77-03a6843d6b72.png) ![security_solution_alerts](https://user-images.githubusercontent.com/4459398/126279321-60d8c118-a97f-4c3f-b997-a966f7755d33.png) Related RAC Issue: elastic/security-team#1299 To reduce the size of the `timelines` and `security_solution` plugins, legacy TGrid code and the dependency on `react-beautiful-dnd` will be removed in a follow-up PR. - Related issue: elastic#105941 The legacy code and dependencies will be deleted when the following tasks are completed (in follow-up PRs): - Sorting: Map `redux` sort state to `EuiDataGrid`'s `sorting` prop - Actions: Migrate draggable hover actions to `EuiDataGrid` `cellActions` - related PR: <elastic#105500> - Integrate with the Field Browser for adding / removing columns - related PR: <elastic#105207> - Use `BrowserFields` to display field metadata when hovering over a column - related PR: <elastic#105207> - Migrate Security Solution's actions column config from a single column to multiple columns To desk test this PR, you must enable feature flags in the Observability and Security Solution: - To desk test the `Observability > Alerts` page, add the following settings to `config/kibana.dev.yml`: ``` xpack.observability.unsafe.cases.enabled: true xpack.observability.unsafe.alertingExperience.enabled: true xpack.ruleRegistry.write.enabled: true ``` - To desk test the TGrid in the following Security Solution, edit `x-pack/plugins/security_solution/common/experimental_features.ts` and in the `allowedExperimentalValues` section set: ```typescript tGridEnabled: true, ```
## [RAC] [TGrid] Migrate the TGrid's rendering to `EuiDataGrid` This PR migrates TGrid's rendering to use `EuiDataGrid`, per the screenshots below: ![o11y_alerts](https://user-images.githubusercontent.com/4459398/126413504-e825a5a2-1cb5-475e-b514-01fb819793e1.png) ![security_solution_alerts](https://user-images.githubusercontent.com/4459398/126413546-28df8f28-fa81-4b97-91c6-667589ea683c.png) Related RAC Issue: elastic/security-team#1299 ### Prerequisites to deleting legacy code (reducing bundle sizes) To reduce the size of the `timelines` and `security_solution` plugins, legacy TGrid code and the dependency on `react-beautiful-dnd` will be removed in a follow-up PR. - Related issue: #105941 The legacy code and dependencies will be deleted when the following tasks are completed (in follow-up PRs): - Sorting: Map `redux` sort state to `EuiDataGrid`'s `sorting` prop - Actions: Migrate draggable hover actions to `EuiDataGrid` `cellActions` - related PR: <#105500> - Use `BrowserFields` to display field metadata when hovering over a column - related PR: <#105207> - Migrate Security Solution's actions column config from a single column to multiple columns ### Desk testing To desk test this PR, you must enable feature flags in the Observability and Security Solution: - To desk test the `Observability > Alerts` page, add the following settings to `config/kibana.dev.yml`: ``` xpack.observability.unsafe.cases.enabled: true xpack.observability.unsafe.alertingExperience.enabled: true xpack.ruleRegistry.write.enabled: true ``` - To desk test the TGrid in the following Security Solution, edit `x-pack/plugins/security_solution/common/experimental_features.ts` and in the `allowedExperimentalValues` section set: ```typescript tGridEnabled: true, ```
…#106199) ## [RAC] [TGrid] Migrate the TGrid's rendering to `EuiDataGrid` This PR migrates TGrid's rendering to use `EuiDataGrid`, per the screenshots below: ![o11y_alerts](https://user-images.githubusercontent.com/4459398/126413504-e825a5a2-1cb5-475e-b514-01fb819793e1.png) ![security_solution_alerts](https://user-images.githubusercontent.com/4459398/126413546-28df8f28-fa81-4b97-91c6-667589ea683c.png) Related RAC Issue: elastic/security-team#1299 ### Prerequisites to deleting legacy code (reducing bundle sizes) To reduce the size of the `timelines` and `security_solution` plugins, legacy TGrid code and the dependency on `react-beautiful-dnd` will be removed in a follow-up PR. - Related issue: elastic#105941 The legacy code and dependencies will be deleted when the following tasks are completed (in follow-up PRs): - Sorting: Map `redux` sort state to `EuiDataGrid`'s `sorting` prop - Actions: Migrate draggable hover actions to `EuiDataGrid` `cellActions` - related PR: <elastic#105500> - Use `BrowserFields` to display field metadata when hovering over a column - related PR: <elastic#105207> - Migrate Security Solution's actions column config from a single column to multiple columns ### Desk testing To desk test this PR, you must enable feature flags in the Observability and Security Solution: - To desk test the `Observability > Alerts` page, add the following settings to `config/kibana.dev.yml`: ``` xpack.observability.unsafe.cases.enabled: true xpack.observability.unsafe.alertingExperience.enabled: true xpack.ruleRegistry.write.enabled: true ``` - To desk test the TGrid in the following Security Solution, edit `x-pack/plugins/security_solution/common/experimental_features.ts` and in the `allowedExperimentalValues` section set: ```typescript tGridEnabled: true, ```
#106348) ## [RAC] [TGrid] Migrate the TGrid's rendering to `EuiDataGrid` This PR migrates TGrid's rendering to use `EuiDataGrid`, per the screenshots below: ![o11y_alerts](https://user-images.githubusercontent.com/4459398/126413504-e825a5a2-1cb5-475e-b514-01fb819793e1.png) ![security_solution_alerts](https://user-images.githubusercontent.com/4459398/126413546-28df8f28-fa81-4b97-91c6-667589ea683c.png) Related RAC Issue: elastic/security-team#1299 ### Prerequisites to deleting legacy code (reducing bundle sizes) To reduce the size of the `timelines` and `security_solution` plugins, legacy TGrid code and the dependency on `react-beautiful-dnd` will be removed in a follow-up PR. - Related issue: #105941 The legacy code and dependencies will be deleted when the following tasks are completed (in follow-up PRs): - Sorting: Map `redux` sort state to `EuiDataGrid`'s `sorting` prop - Actions: Migrate draggable hover actions to `EuiDataGrid` `cellActions` - related PR: <#105500> - Use `BrowserFields` to display field metadata when hovering over a column - related PR: <#105207> - Migrate Security Solution's actions column config from a single column to multiple columns ### Desk testing To desk test this PR, you must enable feature flags in the Observability and Security Solution: - To desk test the `Observability > Alerts` page, add the following settings to `config/kibana.dev.yml`: ``` xpack.observability.unsafe.cases.enabled: true xpack.observability.unsafe.alertingExperience.enabled: true xpack.ruleRegistry.write.enabled: true ``` - To desk test the TGrid in the following Security Solution, edit `x-pack/plugins/security_solution/common/experimental_features.ts` and in the `allowedExperimentalValues` section set: ```typescript tGridEnabled: true, ``` Co-authored-by: Andrew Goldstein <andrew-goldstein@users.noreply.github.com>
Hi @snide, |
@semd Sounds good and I think that's OK to do a separate PR as this one is mostly a port. I'll leave the review to a member of the @elastic/security-design team. |
Summary
Migrate header columns to use
EuiDataGrid
and implement custom columns utility (aka Field Browser).The code has been moved from the Security Solutions plugin, to the tGrid in timelines plugin, cleaning all the Drag & Drop functionalities.
In the Observability Alerts tGrid (still under experimental flag) it is not used yet waiting for #106199 to be merged.
Security Solutions now uses the timeline plugin Field Browser for rendering the functionality, using a lazy load.
It can be tested in Alerts table, Hosts/Events tab table, and Timelines page table:
Gravacio.de.pantalla.2021-07-20.a.les.11.13.50.mov
Checklist
Delete any items that are not applicable to this PR.