forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cloud Security] [Vulnerabilities] Add grouping capabilities (elastic…
…#174413) ## Summary It closes elastic#165788 and elastic#169050 and elastic#174119 This PR adds the following changes to the Findings -> Vulnerabilities page: - Replaced the DataGrid component with the new CloudSecurityDataTable component - Added the new Grouping component with custom default renderers It also introduced the following changes: - Added context for DataView for easier reuse of the `dataView` methods. - Refactored the Misconfigurations component to consume the `dataView` context - added FTR tests for the Vulnerabilities page - dropped Flyout navigation support (will be readded in the future) ## Screenshots ![image](https://github.com/elastic/kibana/assets/19270322/c6cb7871-ce99-4c33-a615-142aaba63ec9) ![image](https://github.com/elastic/kibana/assets/19270322/ead3358f-7300-489b-b26d-5a37cc99e01d) ## Recording https://github.com/elastic/kibana/assets/19270322/a47be0cf-2849-424d-b19a-d65cb6f502a8 https://github.com/elastic/kibana/assets/19270322/fa395488-7a22-476e-a50e-d0f0e28429e1 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
f474fee
commit 2e025e8
Showing
74 changed files
with
1,541 additions
and
4,908 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
x-pack/plugins/cloud_security_posture/public/common/contexts/data_view_context.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { createContext, useContext } from 'react'; | ||
import { DataView } from '@kbn/data-views-plugin/common'; | ||
|
||
interface DataViewContextValue { | ||
dataView: DataView; | ||
dataViewRefetch?: () => void; | ||
dataViewIsRefetching?: boolean; | ||
} | ||
|
||
export const DataViewContext = createContext<DataViewContextValue | undefined>(undefined); | ||
|
||
/** | ||
* Retrieve context's properties | ||
*/ | ||
export const useDataViewContext = (): DataViewContextValue => { | ||
const contextValue = useContext(DataViewContext); | ||
|
||
if (!contextValue) { | ||
throw new Error('useDataViewContext can only be used within DataViewContext provider'); | ||
} | ||
|
||
return contextValue; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
x-pack/plugins/cloud_security_posture/public/common/hooks/use_cloud_posture_table/index.ts
This file was deleted.
Oops, something went wrong.
155 changes: 0 additions & 155 deletions
155
...d_security_posture/public/common/hooks/use_cloud_posture_table/use_cloud_posture_table.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.