deploy@1696508231
opauloh
tagged this
05 Oct 03:57
## Summary This PR introduces the Cloud Security DataTable component, meant to replace and consolidate the tables used in the Cloud Security plugin The CloudSecurityDataTable component is a wrapper over the `<UnifiedDataTable/>` component. We made that decision based on the number of features it provides for the users plus support from the most common features such as Flyout, Sort, Filtering, and Pagination to the most advanced features like Virtualization and DataView integration. - **Virtualization**: Thanks to Virtualization, users can fetch more data on the table than the limit of `500`, and also use larger items per page if desired. - **DataView integration**: This option allows users to rename Columns as needed by setting custom labels in the DataView. - **Column control**: Users can move columns and resize it as needed, and that settings is saved on the local storage. - **Row Height control**: Users can modify in the Advanced Settings -> `discover:rowHeight` the height of the row. Below is a Matrix comparing the features between the current Findings table, the Vulnerabilities Data Grid and the new CloudSecurityDataTable. Feature | CloudSecurity DataTable (new >= 8.11) | Findings Table (current <= 8.10) | Vulnerabilities Data Grid (current <= 8.10) -- | -- | -- | -- Tooltip on Cell Hover | ❌ | ✅ | ❌ Column Sorting | ✅ | ✅ | ✅ Multi Column Sorting | ✅ | ❌ | ✅ Column filtering | ✅ | ✅ | ✅ Pagination | ✅ | ✅ | ✅ Rows per page | ✅ | ✅ | ✅ Virtualization (Support to load more data) | ✅ | ❌ | ❌ Custom component on Column Header | ❌ (only custom text) | ✅ | ❌ Additional controls on the left | ✅ | ❌ | ✅ Text truncation | ✅ | ✅ | ✅ Override Style | ✅ (https://github.com/elastic/kibana/pull/166994) | ✅ | ✅ Load more button | ✅ | ❌ | ❌ Resize column | ✅ | ❌ | ✅ Reorder column | ✅ | ❌ | ✅ FullScreen button | ✅ | ❌ | ✅ User-defined row height | ✅ | ❌ | ❌ external pagination control (enables Flyout pagination) | ❌ | ✅ | ✅ user-defined column renaming | ✅ (using DataViews) | ❌ | ❌ ### Regressions There are some regressions such as losing the ability to paginate on the Flyout and the table pagination is no longer controlled by URL params, that's because pagination is controlled by an internal state in the `<UnifiedDataTable/>` component, and we plan to re-enable those features again in the future by contributing to the `<UnifiedDataTable/>` component. ### Screenshots ![image](https://github.com/elastic/kibana/assets/19270322/a0d1f95a-adcc-4e58-9d3e-0adec3df8b3b) ### Videos Basic Features + Virtualization https://github.com/elastic/kibana/assets/19270322/b1a61592-e1ae-4baf-9610-3e24c473c17d https://github.com/elastic/kibana/assets/19270322/d8e6106c-0ca3-4277-b78b-5ca482095ae1 DataView integration https://github.com/elastic/kibana/assets/19270322/0d583243-bb86-45e4-baa5-dc63253da8f6 Row Height Control https://github.com/elastic/kibana/assets/19270322/b1d43609-7c8a-4855-ab2f-624c18663579 --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Jordan <[email protected]>