-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution]Analyzer in flyout Part 1 - add split mode in anal…
…yzer and enable visualization tab (#192531) ## Summary This PR is part 1 of moving analyzer to alerts flyout. To support rendering the analyzer graph and details panel separately, this PR introduced a `split` mode in analyzer: - In split mode an additional `show panel` button is added in graph control. ![image](https://github.com/user-attachments/assets/5af3d387-69ac-4668-95d4-aedd53e897fb) - default mode shows the panel as part of the graph (alert table scenario) ![image](https://github.com/user-attachments/assets/93a9f0ad-163b-45a3-9e7f-41d83e1cd85b) ## Update to analyzer state in redux To support analyzer in alerts table and in flyout, the redux store for alert/event table uses `scopeId` (`alerts-page` in screenshot), the flyout analyzer uses `flyoutUrl-scopeId` (i.e. `SecuritySolution-alerts-page`) ![image](https://github.com/user-attachments/assets/c7f50866-642a-4e5d-9d80-a303f24934cb) ### Feature flag This feature is currently behind a feature flag `visualizationInFlyoutEnabled` Note: this also enables session view in visualization section ### Video demo https://github.com/user-attachments/assets/6a95497e-1e94-42fe-a227-bbb9a7f0c303 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- Loading branch information
1 parent
6030231
commit 2650cd0
Showing
24 changed files
with
725 additions
and
60 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
39 changes: 39 additions & 0 deletions
39
x-pack/plugins/security_solution/public/flyout/document_details/analyzer_panels/index.tsx
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,39 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import type { FlyoutPanelProps } from '@kbn/expandable-flyout'; | ||
import { FlyoutBody } from '@kbn/security-solution-common'; | ||
import type { DocumentDetailsAnalyzerPanelKey } from '../shared/constants/panel_keys'; | ||
import { DetailsPanel } from '../../../resolver/view/details_panel'; | ||
|
||
interface AnalyzerPanelProps extends Record<string, unknown> { | ||
/** | ||
* id to identify the scope of analyzer in redux | ||
*/ | ||
resolverComponentInstanceID: string; | ||
} | ||
|
||
export interface AnalyzerPanelExpandableFlyoutProps extends FlyoutPanelProps { | ||
key: typeof DocumentDetailsAnalyzerPanelKey; | ||
params: AnalyzerPanelProps; | ||
} | ||
|
||
/** | ||
* Displays node details panel for analyzer | ||
*/ | ||
export const AnalyzerPanel: React.FC<AnalyzerPanelProps> = ({ resolverComponentInstanceID }) => { | ||
return ( | ||
<FlyoutBody> | ||
<div style={{ marginTop: '-15px' }}> | ||
<DetailsPanel resolverComponentInstanceID={resolverComponentInstanceID} /> | ||
</div> | ||
</FlyoutBody> | ||
); | ||
}; | ||
|
||
AnalyzerPanel.displayName = 'AnalyzerPanel'; |
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
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
Oops, something went wrong.