mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[Security Solution] Revert security_solution_common
package which is unnecessary (#198294)
## Summary This PR reverts https://github.com/elastic/kibana/pull/189633. ### Background PR : https://github.com/elastic/kibana/pull/189633 had created a package `security_solution_common` so that security components can be easily used in Discover plugins. But because of recent direction change, I have decided to revert that change which mainly moved `flyout` code to the `security_solution_common` package. Most of the changes that you will see will be path changes replacing `security_solution_common`. ## TL;DR `security_solution_common` is being removed as the reason it was created does not exists any more. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
d1171418dd
commit
641d0e2d47
121 changed files with 146 additions and 548 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -793,7 +793,6 @@ x-pack/packages/security/plugin_types_common @elastic/kibana-security
|
|||
x-pack/packages/security/plugin_types_public @elastic/kibana-security
|
||||
x-pack/packages/security/plugin_types_server @elastic/kibana-security
|
||||
x-pack/packages/security/role_management_model @elastic/kibana-security
|
||||
x-pack/packages/security-solution/common @elastic/security-threat-hunting-investigations
|
||||
x-pack/packages/security-solution/distribution_bar @elastic/kibana-cloud-security-posture
|
||||
x-pack/plugins/security_solution_ess @elastic/security-solution
|
||||
x-pack/packages/security-solution/features @elastic/security-threat-hunting-explore
|
||||
|
|
|
@ -810,7 +810,6 @@
|
|||
"@kbn/security-plugin-types-public": "link:x-pack/packages/security/plugin_types_public",
|
||||
"@kbn/security-plugin-types-server": "link:x-pack/packages/security/plugin_types_server",
|
||||
"@kbn/security-role-management-model": "link:x-pack/packages/security/role_management_model",
|
||||
"@kbn/security-solution-common": "link:x-pack/packages/security-solution/common",
|
||||
"@kbn/security-solution-distribution-bar": "link:x-pack/packages/security-solution/distribution_bar",
|
||||
"@kbn/security-solution-ess": "link:x-pack/plugins/security_solution_ess",
|
||||
"@kbn/security-solution-features": "link:x-pack/packages/security-solution/features",
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { getDiscoverCellRenderer } from '@kbn/security-solution-common';
|
||||
import { RootProfileProvider, SolutionType } from '../../../profiles';
|
||||
import { ProfileProviderServices } from '../../profile_provider_services';
|
||||
import { SecurityProfileProviderFactory } from '../types';
|
||||
|
@ -21,12 +19,6 @@ export const createSecurityRootProfileProvider: SecurityProfileProviderFactory<
|
|||
profile: {
|
||||
getCellRenderers: (prev) => (params) => ({
|
||||
...prev(params),
|
||||
'host.name': (props) => {
|
||||
const CellRenderer = getDiscoverCellRenderer({
|
||||
fieldName: 'host.name',
|
||||
});
|
||||
return <CellRenderer {...props} />;
|
||||
},
|
||||
}),
|
||||
},
|
||||
resolve: (params) => {
|
||||
|
|
|
@ -95,7 +95,6 @@
|
|||
"@kbn/presentation-containers",
|
||||
"@kbn/observability-ai-assistant-plugin",
|
||||
"@kbn/fields-metadata-plugin",
|
||||
"@kbn/security-solution-common",
|
||||
"@kbn/logs-data-access-plugin",
|
||||
"@kbn/core-lifecycle-browser",
|
||||
"@kbn/discover-contextual-components",
|
||||
|
|
|
@ -1580,8 +1580,6 @@
|
|||
"@kbn/security-plugin-types-server/*": ["x-pack/packages/security/plugin_types_server/*"],
|
||||
"@kbn/security-role-management-model": ["x-pack/packages/security/role_management_model"],
|
||||
"@kbn/security-role-management-model/*": ["x-pack/packages/security/role_management_model/*"],
|
||||
"@kbn/security-solution-common": ["x-pack/packages/security-solution/common"],
|
||||
"@kbn/security-solution-common/*": ["x-pack/packages/security-solution/common/*"],
|
||||
"@kbn/security-solution-distribution-bar": ["x-pack/packages/security-solution/distribution_bar"],
|
||||
"@kbn/security-solution-distribution-bar/*": ["x-pack/packages/security-solution/distribution_bar/*"],
|
||||
"@kbn/security-solution-ess": ["x-pack/plugins/security_solution_ess"],
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export { HostDetailsButton } from './src/cells/renderers/host';
|
||||
|
||||
export * from './src/flyout';
|
||||
export * from './src/cells/renderers';
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
rootDir: '../../../..',
|
||||
roots: ['<rootDir>/x-pack/packages/security-solution/common'],
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"type": "shared-browser",
|
||||
"id": "@kbn/security-solution-common",
|
||||
"owner": "@elastic/security-threat-hunting-investigations"
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"name": "@kbn/security-solution-common",
|
||||
"version": "1.0.0",
|
||||
"description": "security solution common components which can be used in multiple plugins such as custom discover and timeline",
|
||||
"license": "Elastic License 2.0",
|
||||
"private": true,
|
||||
"sideEffects": false
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* 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 { DataGridCellValueElementProps } from '@kbn/unified-data-table';
|
||||
import { ComponentType, PropsWithChildren } from 'react';
|
||||
import { HostCellWithFlyoutRenderer } from './host';
|
||||
|
||||
export type DiscoverCellRenderer = ComponentType<PropsWithChildren<DataGridCellValueElementProps>>;
|
||||
|
||||
const RENDERERS: Record<string, DiscoverCellRenderer> = {
|
||||
'host.name': HostCellWithFlyoutRenderer,
|
||||
};
|
||||
|
||||
interface GetRendererArgs {
|
||||
fieldName: string;
|
||||
}
|
||||
|
||||
export const getDiscoverCellRenderer = ({ fieldName }: GetRendererArgs) => {
|
||||
return RENDERERS[fieldName];
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export { getDiscoverCellRenderer } from './discover';
|
||||
export type { DiscoverCellRenderer } from './discover';
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* 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 { HostDetailsButton } from './button';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
|
||||
const onClickMock = jest.fn();
|
||||
const TestComponent = () => {
|
||||
return <HostDetailsButton onClick={onClickMock}>{'Test'}</HostDetailsButton>;
|
||||
};
|
||||
|
||||
describe('Host Button', () => {
|
||||
it('should render as button with link formatting', () => {
|
||||
render(<TestComponent />);
|
||||
expect(screen.getByTestId('host-details-button')).toBeVisible();
|
||||
expect(screen.getByTestId('host-details-button')).toHaveAttribute('type', 'button');
|
||||
expect(screen.getByTestId('host-details-button')).toHaveClass('euiLink');
|
||||
});
|
||||
|
||||
it('should perform onClick Correctly', () => {
|
||||
render(<TestComponent />);
|
||||
screen.getByTestId('host-details-button').click();
|
||||
expect(onClickMock).toHaveBeenCalled();
|
||||
});
|
||||
});
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* 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, { SyntheticEvent } from 'react';
|
||||
import { EuiLink } from '@elastic/eui';
|
||||
|
||||
interface HostDetailsButtonProps {
|
||||
children?: React.ReactNode;
|
||||
onClick?: (e: SyntheticEvent) => void;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export const HostDetailsButton: React.FC<HostDetailsButtonProps> = ({
|
||||
children,
|
||||
onClick,
|
||||
title,
|
||||
}) => {
|
||||
return (
|
||||
<EuiLink data-test-subj="host-details-button" onClick={onClick} title={title ?? 'Host Details'}>
|
||||
{children}
|
||||
</EuiLink>
|
||||
);
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export * from './button';
|
||||
export * from './with_expandable_flyout';
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* 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 {
|
||||
HostCellWithFlyoutRenderer,
|
||||
HostCellWithFlyoutRendererProps,
|
||||
} from './with_expandable_flyout';
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
|
||||
const renderTestComponents = (props?: Partial<HostCellWithFlyoutRendererProps>) => {
|
||||
const finalProps: HostCellWithFlyoutRendererProps = {
|
||||
rowIndex: 0,
|
||||
columnId: 'test',
|
||||
setCellProps: jest.fn(),
|
||||
isExpandable: false,
|
||||
isExpanded: true,
|
||||
isDetails: false,
|
||||
colIndex: 0,
|
||||
fieldFormats: {} as HostCellWithFlyoutRendererProps['fieldFormats'],
|
||||
dataView: {} as HostCellWithFlyoutRendererProps['dataView'],
|
||||
closePopover: jest.fn(),
|
||||
row: {
|
||||
id: '1',
|
||||
raw: {
|
||||
_source: {
|
||||
host: {
|
||||
name: 'test-host-name',
|
||||
},
|
||||
},
|
||||
},
|
||||
flattened: {
|
||||
'host.name': 'test-host-name',
|
||||
},
|
||||
},
|
||||
...props,
|
||||
};
|
||||
return render(<HostCellWithFlyoutRenderer {...finalProps} />);
|
||||
};
|
||||
|
||||
describe('With Expandable Flyout', () => {
|
||||
it('should open Expandable Flyout on Click', () => {
|
||||
renderTestComponents();
|
||||
|
||||
expect(screen.getByTestId('host-details-button')).toBeVisible();
|
||||
screen.getByTestId('host-details-button').click();
|
||||
expect(screen.getByTestId('host-name-flyout')).toBeVisible();
|
||||
expect(screen.getByText('Host Flyout Header - test-host-name')).toBeVisible();
|
||||
});
|
||||
});
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
* 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, { useCallback, useMemo } from 'react';
|
||||
import { getFieldValue } from '@kbn/discover-utils';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type { DataGridCellValueElementProps } from '@kbn/unified-data-table';
|
||||
import {
|
||||
ExpandableFlyout,
|
||||
type ExpandableFlyoutProps,
|
||||
useExpandableFlyoutApi,
|
||||
withExpandableFlyoutProvider,
|
||||
} from '@kbn/expandable-flyout';
|
||||
import { HostRightPanel, HostRightPanelProps } from '../../../flyout/panels';
|
||||
import { HostDetailsButton } from './button';
|
||||
|
||||
export type HostCellWithFlyoutRendererProps = PropsWithChildren<DataGridCellValueElementProps>;
|
||||
|
||||
const HostCellWithFlyoutRendererComp = React.memo(function HostCellWithFlyoutRendererComp(
|
||||
props: HostCellWithFlyoutRendererProps
|
||||
) {
|
||||
const hostName = getFieldValue(props.row, 'host.name') as string;
|
||||
|
||||
const { openFlyout } = useExpandableFlyoutApi();
|
||||
|
||||
const onClick = useCallback(() => {
|
||||
openFlyout({
|
||||
right: {
|
||||
id: `host-panel-${hostName}-${props.rowIndex}`,
|
||||
params: {
|
||||
hostName,
|
||||
},
|
||||
} as HostRightPanelProps,
|
||||
});
|
||||
}, [openFlyout, hostName, props.rowIndex]);
|
||||
|
||||
const panels: ExpandableFlyoutProps['registeredPanels'] = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
key: `host-panel-${hostName}-${props.rowIndex}`,
|
||||
component: (panelProps) => {
|
||||
return <HostRightPanel {...(panelProps as HostRightPanelProps).params} />;
|
||||
},
|
||||
},
|
||||
];
|
||||
}, [hostName, props.rowIndex]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ExpandableFlyout
|
||||
data-test-subj="host-name-flyout"
|
||||
registeredPanels={panels}
|
||||
paddingSize="none"
|
||||
/>
|
||||
<HostDetailsButton onClick={onClick}>{hostName}</HostDetailsButton>
|
||||
</>
|
||||
);
|
||||
});
|
||||
|
||||
export const HostCellWithFlyoutRenderer = withExpandableFlyoutProvider(
|
||||
HostCellWithFlyoutRendererComp
|
||||
);
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export * from './get';
|
|
@ -1,16 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export { FlyoutFooter } from './flyout_footer';
|
||||
export { FlyoutError } from './flyout_error';
|
||||
export { FlyoutLoading } from './flyout_loading';
|
||||
export { FlyoutNavigation } from './flyout_navigation';
|
||||
export { FlyoutTitle } from './flyout_title';
|
||||
export { FlyoutBody } from './flyout_body';
|
||||
export { FlyoutHeader } from './flyout_header';
|
||||
export { FlyoutHeaderTabs } from './flyout_header_tabs';
|
||||
export { ExpandablePanel } from './expandable_panel';
|
|
@ -1,10 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export * from './common/components';
|
||||
export * from './common/test_ids';
|
||||
export { HostRightPanel } from './panels';
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* 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 { FlyoutPanelProps } from '@kbn/expandable-flyout';
|
||||
import React from 'react';
|
||||
import {
|
||||
FlyoutBody,
|
||||
FlyoutFooter,
|
||||
FlyoutHeader,
|
||||
FlyoutNavigation,
|
||||
} from '../../../common/components';
|
||||
// import { getEntityTableColumns } from './columns';
|
||||
// import type { BasicEntityData, EntityTableRows } from './types';
|
||||
|
||||
export interface HostRightPanelParamProps extends Record<string, unknown> {
|
||||
hostName: string;
|
||||
}
|
||||
|
||||
export interface HostRightPanelProps extends FlyoutPanelProps {
|
||||
key: 'host';
|
||||
params: HostRightPanelParamProps;
|
||||
}
|
||||
|
||||
export const HostRightPanel = (props: HostRightPanelParamProps) => {
|
||||
return (
|
||||
<>
|
||||
<FlyoutNavigation flyoutIsExpandable={true} />
|
||||
<FlyoutHeader>{`Host Flyout Header - ${props.hostName}`}</FlyoutHeader>
|
||||
<FlyoutBody>{'Host Flyout'}</FlyoutBody>
|
||||
<FlyoutFooter>{'Host Flyout Footer'}</FlyoutFooter>
|
||||
</>
|
||||
);
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export * from './host/right';
|
||||
export * from './keys';
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export const HOST_PANEL = 'host-panel';
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "target/types",
|
||||
"types": [
|
||||
"jest",
|
||||
"node",
|
||||
"react",
|
||||
"@testing-library/jest-dom",
|
||||
"@testing-library/react",
|
||||
"@emotion/react/types/css-prop"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.tsx"
|
||||
],
|
||||
"kbn_references": [
|
||||
"@kbn/unified-data-table",
|
||||
"@kbn/discover-utils",
|
||||
"@kbn/expandable-flyout",
|
||||
"@kbn/i18n",
|
||||
"@kbn/i18n-react"
|
||||
],
|
||||
"exclude": [
|
||||
"target/**/*"
|
||||
]
|
||||
}
|
|
@ -13,7 +13,6 @@ import { FormattedMessage } from '@kbn/i18n-react';
|
|||
import { DistributionBar } from '@kbn/security-solution-distribution-bar';
|
||||
import { useMisconfigurationPreview } from '@kbn/cloud-security-posture/src/hooks/use_misconfiguration_preview';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { useVulnerabilitiesPreview } from '@kbn/cloud-security-posture/src/hooks/use_vulnerabilities_preview';
|
||||
|
@ -23,6 +22,7 @@ import {
|
|||
ENTITY_FLYOUT_WITH_MISCONFIGURATION_VISIT,
|
||||
uiMetricService,
|
||||
} from '@kbn/cloud-security-posture-common/utils/ui_metrics';
|
||||
import { ExpandablePanel } from '../../../flyout/shared/components/expandable_panel';
|
||||
import {
|
||||
CspInsightLeftPanelSubTab,
|
||||
EntityDetailsLeftPanelTab,
|
||||
|
|
|
@ -12,7 +12,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText, useEuiTheme, EuiTitle }
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { DistributionBar } from '@kbn/security-solution-distribution-bar';
|
||||
import { useVulnerabilitiesPreview } from '@kbn/cloud-security-posture/src/hooks/use_vulnerabilities_preview';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import {
|
||||
buildEntityFlyoutPreviewQuery,
|
||||
getAbbreviatedNumber,
|
||||
|
@ -25,6 +24,7 @@ import {
|
|||
uiMetricService,
|
||||
} from '@kbn/cloud-security-posture-common/utils/ui_metrics';
|
||||
import { METRIC_TYPE } from '@kbn/analytics';
|
||||
import { ExpandablePanel } from '../../../flyout/shared/components/expandable_panel';
|
||||
import { EntityDetailsLeftPanelTab } from '../../../flyout/entity_details/shared/components/left_panel/left_panel_header';
|
||||
import { HostDetailsPanelKey } from '../../../flyout/entity_details/host_details_left';
|
||||
import { useRiskScore } from '../../../entity_analytics/api/hooks/use_risk_score';
|
||||
|
|
|
@ -22,16 +22,14 @@ import { FormattedMessage } from '@kbn/i18n-react';
|
|||
import { euiThemeVars } from '@kbn/ui-theme';
|
||||
import dateMath from '@kbn/datemath';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { useKibana } from '../../../common/lib/kibana/kibana_react';
|
||||
|
||||
import { EntityDetailsLeftPanelTab } from '../../../flyout/entity_details/shared/components/left_panel/left_panel_header';
|
||||
|
||||
import { InspectButton, InspectButtonContainer } from '../../../common/components/inspect';
|
||||
import { ONE_WEEK_IN_HOURS } from '../../../flyout/entity_details/shared/constants';
|
||||
import { FormattedRelativePreferenceDate } from '../../../common/components/formatted_date';
|
||||
import { RiskScoreEntity } from '../../../../common/entity_analytics/risk_engine';
|
||||
import { VisualizationEmbeddable } from '../../../common/components/visualization_actions/visualization_embeddable';
|
||||
import { ExpandablePanel } from '../../../flyout/shared/components/expandable_panel';
|
||||
import type { RiskScoreState } from '../../api/hooks/use_risk_score';
|
||||
import { getRiskScoreSummaryAttributes } from '../../lens_attributes/risk_score_summary';
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@ import { EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui';
|
|||
import styled from '@emotion/styled';
|
||||
import { euiThemeVars } from '@kbn/ui-theme';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { FlyoutError } from '@kbn/security-solution-common';
|
||||
import { ALERT_REASON_BODY_TEST_ID } from './test_ids';
|
||||
import { useAlertReasonPanelContext } from './context';
|
||||
import { getRowRenderer } from '../../../timelines/components/timeline/body/renderers/get_row_renderer';
|
||||
import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers';
|
||||
import { FlyoutError } from '../../shared/components/flyout_error';
|
||||
|
||||
const ReasonContainerWrapper = styled.div`
|
||||
overflow-x: auto;
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
|
||||
import React, { createContext, memo, useContext, useMemo } from 'react';
|
||||
import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs';
|
||||
import { FlyoutError, FlyoutLoading } from '@kbn/security-solution-common';
|
||||
import { useEventDetails } from '../shared/hooks/use_event_details';
|
||||
import { FlyoutError } from '../../shared/components/flyout_error';
|
||||
import { FlyoutLoading } from '../../shared/components/flyout_loading';
|
||||
import type { AlertReasonPanelProps } from '.';
|
||||
|
||||
export interface AlertReasonPanelContext {
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
import React, { useCallback } from 'react';
|
||||
import type { FlyoutPanelProps } from '@kbn/expandable-flyout';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import type { DocumentDetailsAnalyzerPanelKey } from '../shared/constants/panel_keys';
|
||||
import { DetailsPanel } from '../../../resolver/view/details_panel';
|
||||
import type { NodeEventOnClick } from '../../../resolver/view/panels/node_events_of_type';
|
||||
import { DocumentDetailsPreviewPanelKey } from '../shared/constants/panel_keys';
|
||||
import { ALERT_PREVIEW_BANNER, EVENT_PREVIEW_BANNER } from '../preview/constants';
|
||||
import { FlyoutBody } from '../../shared/components/flyout_body';
|
||||
|
||||
interface AnalyzerPanelProps extends Record<string, unknown> {
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import type { FC } from 'react';
|
||||
import React, { useCallback } from 'react';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { DocumentDetailsRightPanelKey } from '../shared/constants/panel_keys';
|
||||
import { useBasicDataFromDetailsData } from '../shared/hooks/use_basic_data_from_details_data';
|
||||
import {
|
||||
|
@ -17,6 +16,7 @@ import {
|
|||
} from '../../../common/components/endpoint/host_isolation';
|
||||
import { useHostIsolation } from '../shared/hooks/use_host_isolation';
|
||||
import { useIsolateHostPanelContext } from './context';
|
||||
import { FlyoutBody } from '../../shared/components/flyout_body';
|
||||
|
||||
/**
|
||||
* Document details expandable flyout section content for the isolate host component, displaying the form or the success banner
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common';
|
||||
import React, { createContext, memo, useContext, useMemo } from 'react';
|
||||
|
||||
import { FlyoutError, FlyoutLoading } from '@kbn/security-solution-common';
|
||||
import { useEventDetails } from '../shared/hooks/use_event_details';
|
||||
import { FlyoutError } from '../../shared/components/flyout_error';
|
||||
import { FlyoutLoading } from '../../shared/components/flyout_loading';
|
||||
import type { IsolateHostPanelProps } from '.';
|
||||
|
||||
export interface IsolateHostPanelContext {
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from '@elastic/eui';
|
||||
import type { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { FlyoutHeader } from '@kbn/security-solution-common';
|
||||
import { AgentTypeIntegration } from '../../../common/components/endpoint/agents/agent_type_integration';
|
||||
import { useAlertResponseActionsSupport } from '../../../common/hooks/endpoint/use_alert_response_actions_support';
|
||||
import { useIsolateHostPanelContext } from './context';
|
||||
import { FLYOUT_HEADER_TITLE_TEST_ID } from './test_ids';
|
||||
import { FlyoutHeader } from '../../shared/components/flyout_header';
|
||||
import { ISOLATE_HOST, UNISOLATE_HOST } from '../../../common/components/endpoint';
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,7 +28,7 @@ import { useFetchRelatedAlertsBySameSourceEvent } from '../../shared/hooks/use_f
|
|||
import { useFetchRelatedCases } from '../../shared/hooks/use_fetch_related_cases';
|
||||
import { mockContextValue } from '../../shared/mocks/mock_context';
|
||||
import { useTimelineDataFilters } from '../../../../timelines/containers/use_timeline_data_filters';
|
||||
import { EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID } from '@kbn/security-solution-common';
|
||||
import { EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID } from '../../../shared/components/test_ids';
|
||||
|
||||
jest.mock('react-router-dom', () => {
|
||||
const actual = jest.requireActual('react-router-dom');
|
||||
|
|
|
@ -14,13 +14,13 @@ import { isRight } from 'fp-ts/lib/Either';
|
|||
import { ALERT_REASON, ALERT_RULE_NAME } from '@kbn/rule-data-utils';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features';
|
||||
import { CellTooltipWrapper } from '../../shared/components/cell_tooltip_wrapper';
|
||||
import type { DataProvider } from '../../../../../common/types';
|
||||
import { SeverityBadge } from '../../../../common/components/severity_badge';
|
||||
import { usePaginatedAlerts } from '../hooks/use_paginated_alerts';
|
||||
import { InvestigateInTimelineButton } from '../../../../common/components/event_details/investigate_in_timeline_button';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import { ACTION_INVESTIGATE_IN_TIMELINE } from '../../../../detections/components/alerts_table/translations';
|
||||
import { getDataProvider } from '../../../../common/components/event_details/use_action_cell_data_provider';
|
||||
import { AlertPreviewButton } from '../../../shared/components/alert_preview_button';
|
||||
|
|
|
@ -13,7 +13,7 @@ import { TestProviders } from '../../../../common/mock';
|
|||
import { EntitiesDetails } from './entities_details';
|
||||
import { ENTITIES_DETAILS_TEST_ID, HOST_DETAILS_TEST_ID, USER_DETAILS_TEST_ID } from './test_ids';
|
||||
import { mockContextValue } from '../../shared/mocks/mock_context';
|
||||
import { EXPANDABLE_PANEL_CONTENT_TEST_ID } from '@kbn/security-solution-common';
|
||||
import { EXPANDABLE_PANEL_CONTENT_TEST_ID } from '../../../shared/components/test_ids';
|
||||
import type { Anomalies } from '../../../../common/components/ml/types';
|
||||
import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities';
|
||||
import { mockAnomalies } from '../../../../common/components/ml/mock';
|
||||
|
|
|
@ -30,7 +30,7 @@ import {
|
|||
HOST_DETAILS_VULNERABILITIES_TEST_ID,
|
||||
HOST_DETAILS_ALERT_COUNT_TEST_ID,
|
||||
} from './test_ids';
|
||||
import { EXPANDABLE_PANEL_CONTENT_TEST_ID } from '@kbn/security-solution-common';
|
||||
import { EXPANDABLE_PANEL_CONTENT_TEST_ID } from '../../../shared/components/test_ids';
|
||||
import { useRiskScore } from '../../../../entity_analytics/api/hooks/use_risk_score';
|
||||
import { mockContextValue } from '../../shared/mocks/mock_context';
|
||||
import { mockFlyoutApi } from '../../shared/mocks/mock_flyout_context';
|
||||
|
|
|
@ -25,8 +25,8 @@ import type { EuiBasicTableColumn } from '@elastic/eui';
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import type { RelatedUser } from '../../../../../common/search_strategy/security_solution/related_entities/related_users';
|
||||
import type { RiskSeverity } from '../../../../../common/search_strategy';
|
||||
import { HostOverview } from '../../../../overview/components/host_overview';
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
import React from 'react';
|
||||
import { EuiLink } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { FlyoutLoading } from '@kbn/security-solution-common';
|
||||
import { useInvestigationGuide } from '../../shared/hooks/use_investigation_guide';
|
||||
import { useDocumentDetailsContext } from '../../shared/context';
|
||||
import { INVESTIGATION_GUIDE_TEST_ID, INVESTIGATION_GUIDE_LOADING_TEST_ID } from './test_ids';
|
||||
import { InvestigationGuideView } from './investigation_guide_view';
|
||||
import { FlyoutLoading } from '../../../shared/components/flyout_loading';
|
||||
|
||||
/**
|
||||
* Investigation guide displayed in the left panel.
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
import { usePaginatedAlerts } from '../hooks/use_paginated_alerts';
|
||||
|
||||
jest.mock('../../shared/hooks/use_fetch_related_alerts_by_ancestry');
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
import { usePaginatedAlerts } from '../hooks/use_paginated_alerts';
|
||||
|
||||
jest.mock('../../shared/hooks/use_fetch_related_alerts_by_same_source_event');
|
||||
|
|
|
@ -21,7 +21,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
|
||||
jest.mock('../../shared/hooks/use_fetch_related_alerts_by_session');
|
||||
jest.mock('../hooks/use_paginated_alerts');
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
|
||||
jest.mock('../../shared/hooks/use_fetch_related_cases');
|
||||
jest.mock('../../../../common/components/links', () => ({
|
||||
|
|
|
@ -10,7 +10,6 @@ import type { EuiBasicTableColumn } from '@elastic/eui';
|
|||
import { EuiInMemoryTable } from '@elastic/eui';
|
||||
import type { RelatedCase } from '@kbn/cases-plugin/common';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { CellTooltipWrapper } from '../../shared/components/cell_tooltip_wrapper';
|
||||
import { CaseDetailsLink } from '../../../../common/components/links';
|
||||
import {
|
||||
|
@ -18,6 +17,7 @@ import {
|
|||
CORRELATIONS_DETAILS_CASES_SECTION_TEST_ID,
|
||||
} from './test_ids';
|
||||
import { useFetchRelatedCases } from '../../shared/hooks/use_fetch_related_cases';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
|
||||
const ICON = 'warning';
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
import { DocumentDetailsContext } from '../../shared/context';
|
||||
import { mockContextValue } from '../../shared/mocks/mock_context';
|
||||
import { isSuppressionRuleInGA } from '../../../../../common/detection_engine/utils';
|
||||
|
|
|
@ -12,8 +12,8 @@ import { ALERT_RULE_TYPE } from '@kbn/rule-data-utils';
|
|||
import { EuiBetaBadge, EuiFlexItem, EuiFlexGroup } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import type { Type } from '@kbn/securitysolution-io-ts-alerting-types';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import {
|
||||
CORRELATIONS_DETAILS_SUPPRESSED_ALERTS_SECTION_TEST_ID,
|
||||
SUPPRESSED_ALERTS_SECTION_TECHNICAL_PREVIEW_TEST_ID,
|
||||
|
|
|
@ -9,7 +9,6 @@ import React, { memo } from 'react';
|
|||
import { EuiHorizontalRule, EuiSpacer } from '@elastic/eui';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import { groupBy } from 'lodash';
|
||||
import { FlyoutLoading } from '@kbn/security-solution-common';
|
||||
import { EnrichmentSection } from './threat_details_view_enrichment_section';
|
||||
import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants';
|
||||
import { EnrichmentRangePicker } from './threat_intelligence_view_enrichment_range_picker';
|
||||
|
@ -20,6 +19,7 @@ import {
|
|||
THREAT_INTELLIGENCE_ENRICHMENTS_TEST_ID,
|
||||
THREAT_INTELLIGENCE_MATCHES_TEST_ID,
|
||||
} from './test_ids';
|
||||
import { FlyoutLoading } from '../../../shared/components/flyout_loading';
|
||||
|
||||
export const THREAT_INTELLIGENCE_TAB_ID = 'threatIntelligence';
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import {
|
|||
USER_DETAILS_MISCONFIGURATIONS_TEST_ID,
|
||||
USER_DETAILS_ALERT_COUNT_TEST_ID,
|
||||
} from './test_ids';
|
||||
import { EXPANDABLE_PANEL_CONTENT_TEST_ID } from '@kbn/security-solution-common';
|
||||
import { EXPANDABLE_PANEL_CONTENT_TEST_ID } from '../../../shared/components/test_ids';
|
||||
import { useRiskScore } from '../../../../entity_analytics/api/hooks/use_risk_score';
|
||||
import { mockContextValue } from '../../shared/mocks/mock_context';
|
||||
import { mockFlyoutApi } from '../../shared/mocks/mock_flyout_context';
|
||||
|
|
|
@ -25,8 +25,8 @@ import type { EuiBasicTableColumn } from '@elastic/eui';
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import type { RelatedHost } from '../../../../../common/search_strategy/security_solution/related_entities/related_hosts';
|
||||
import type { RiskSeverity } from '../../../../../common/search_strategy';
|
||||
import { UserOverview } from '../../../../overview/components/user_overview';
|
||||
|
|
|
@ -9,9 +9,9 @@ import { useEuiBackgroundColor } from '@elastic/eui';
|
|||
import type { FC } from 'react';
|
||||
import React, { useMemo } from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import type { LeftPanelPaths } from '.';
|
||||
import type { LeftPanelTabType } from './tabs';
|
||||
import { FlyoutBody } from '../../shared/components/flyout_body';
|
||||
|
||||
export interface PanelContentProps {
|
||||
/**
|
||||
|
|
|
@ -9,8 +9,8 @@ import { EuiTab, EuiTabs, useEuiBackgroundColor } from '@elastic/eui';
|
|||
import type { FC } from 'react';
|
||||
import React, { memo } from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
import { FlyoutHeader } from '@kbn/security-solution-common';
|
||||
import type { LeftPanelPaths } from '.';
|
||||
import { FlyoutHeader } from '../../shared/components/flyout_header';
|
||||
import type { LeftPanelTabType } from './tabs';
|
||||
import { getField } from '../shared/utils';
|
||||
import { EventKind } from '../shared/constants/event_kinds';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { PREFIX } from '@kbn/security-solution-common';
|
||||
import { PREFIX } from '../../shared/test_ids';
|
||||
|
||||
export const VISUALIZE_TAB_TEST_ID = `${PREFIX}VisualizeTab` as const;
|
||||
export const INSIGHTS_TAB_TEST_ID = `${PREFIX}InsightsTab` as const;
|
||||
|
|
|
@ -9,9 +9,9 @@ import { EuiLink, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
|||
import React, { useCallback, useMemo } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FlyoutFooter } from '@kbn/security-solution-common';
|
||||
import { getField } from '../shared/utils';
|
||||
import { EventKind } from '../shared/constants/event_kinds';
|
||||
import { FlyoutFooter } from '../../shared/components/flyout_footer';
|
||||
import { DocumentDetailsRightPanelKey } from '../shared/constants/panel_keys';
|
||||
import { useDocumentDetailsContext } from '../shared/context';
|
||||
import { PREVIEW_FOOTER_TEST_ID, PREVIEW_FOOTER_LINK_TEST_ID } from './test_ids';
|
||||
|
|
|
@ -9,7 +9,6 @@ import React, { memo, useCallback, useMemo } from 'react';
|
|||
import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiLink } from '@elastic/eui';
|
||||
import { ALERT_WORKFLOW_ASSIGNEE_IDS } from '@kbn/rule-data-utils';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FlyoutTitle } from '@kbn/security-solution-common';
|
||||
import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features';
|
||||
import { Notes } from './notes';
|
||||
import { useRuleDetailsLink } from '../../shared/hooks/use_rule_details_link';
|
||||
|
@ -22,6 +21,7 @@ import { useDocumentDetailsContext } from '../../shared/context';
|
|||
import { PreferenceFormattedDate } from '../../../../common/components/formatted_date';
|
||||
import { FLYOUT_ALERT_HEADER_TITLE_TEST_ID, ALERT_SUMMARY_PANEL_TEST_ID } from './test_ids';
|
||||
import { Assignees } from './assignees';
|
||||
import { FlyoutTitle } from '../../../shared/components/flyout_title';
|
||||
|
||||
// minWidth for each block, allows to switch for a 1 row 4 blocks to 2 rows with 2 block each
|
||||
const blockStyles = {
|
||||
|
|
|
@ -21,7 +21,8 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_LINK_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
|
||||
import { useInvestigateInTimeline } from '../../../../detections/components/alerts_table/timeline_actions/use_investigate_in_timeline';
|
||||
|
||||
jest.mock(
|
||||
|
|
|
@ -10,7 +10,6 @@ import { useDispatch } from 'react-redux';
|
|||
import { TimelineTabs } from '@kbn/securitysolution-data-table';
|
||||
import { EuiLink, EuiMark } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { useUiSetting$ } from '@kbn/kibana-react-plugin/public';
|
||||
import { ENABLE_VISUALIZATIONS_IN_FLYOUT_SETTING } from '../../../../../common/constants';
|
||||
import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction';
|
||||
|
@ -23,6 +22,7 @@ import { useIsInvestigateInResolverActionEnabled } from '../../../../detections/
|
|||
import { AnalyzerPreview } from './analyzer_preview';
|
||||
import { ANALYZER_PREVIEW_TEST_ID } from './test_ids';
|
||||
import { useNavigateToAnalyzer } from '../../shared/hooks/use_navigate_to_analyzer';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
|
||||
const timelineId = 'timeline-1';
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_LINK_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
import { useTourContext } from '../../../../common/components/guided_onboarding_tour';
|
||||
import { AlertsCasesTourSteps } from '../../../../common/components/guided_onboarding_tour/tour_config';
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { ALERT_RULE_TYPE } from '@kbn/rule-data-utils';
|
||||
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import type { Type } from '@kbn/securitysolution-io-ts-alerting-types';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import { useShowRelatedAlertsBySession } from '../../shared/hooks/use_show_related_alerts_by_session';
|
||||
import { RelatedAlertsBySession } from './related_alerts_by_session';
|
||||
import { useShowRelatedAlertsBySameSourceEvent } from '../../shared/hooks/use_show_related_alerts_by_same_source_event';
|
||||
|
|
|
@ -24,7 +24,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_LINK_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
import { useRiskScore } from '../../../../entity_analytics/api/hooks/use_risk_score';
|
||||
|
||||
const from = '2022-04-05T12:00:00.000Z';
|
||||
|
|
|
@ -9,8 +9,8 @@ import React, { useCallback, useMemo } from 'react';
|
|||
import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { INSIGHTS_ENTITIES_TEST_ID } from './test_ids';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import { useDocumentDetailsContext } from '../../shared/context';
|
||||
import { getField } from '../../shared/utils';
|
||||
import { HostEntityOverview } from './host_entity_overview';
|
||||
|
|
|
@ -9,7 +9,7 @@ import React, { memo, useMemo } from 'react';
|
|||
import { startCase } from 'lodash';
|
||||
import { EuiSpacer } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FlyoutTitle } from '@kbn/security-solution-common';
|
||||
import { FlyoutTitle } from '../../../shared/components/flyout_title';
|
||||
import { DocumentSeverity } from './severity';
|
||||
import { useBasicDataFromDetailsData } from '../../shared/hooks/use_basic_data_from_details_data';
|
||||
import { useDocumentDetailsContext } from '../../shared/context';
|
||||
|
|
|
@ -14,14 +14,13 @@ import { GraphPreviewContainer } from './graph_preview_container';
|
|||
import { GRAPH_PREVIEW_TEST_ID } from './test_ids';
|
||||
import { useGraphPreview } from '../hooks/use_graph_preview';
|
||||
import { useFetchGraphData } from '../hooks/use_fetch_graph_data';
|
||||
|
||||
import {
|
||||
EXPANDABLE_PANEL_CONTENT_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_LINK_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
|
||||
jest.mock('../hooks/use_graph_preview');
|
||||
jest.mock('../hooks/use_fetch_graph_data', () => ({
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { useDocumentDetailsContext } from '../../shared/context';
|
||||
import { GRAPH_PREVIEW_TEST_ID } from './test_ids';
|
||||
import { GraphPreview } from './graph_preview';
|
||||
import { useFetchGraphData } from '../hooks/use_fetch_graph_data';
|
||||
import { useGraphPreview } from '../hooks/use_graph_preview';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
|
||||
const DEFAULT_FROM = 'now-60d/d';
|
||||
const DEFAULT_TO = 'now/d';
|
||||
|
|
|
@ -24,7 +24,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_LOADING_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
import { usePrevalence } from '../../shared/hooks/use_prevalence';
|
||||
import { mockContextValue } from '../../shared/mocks/mock_context';
|
||||
import { type ExpandableFlyoutApi, useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
|
@ -42,7 +42,10 @@ const flyoutContextValue = {
|
|||
openLeftPanel: jest.fn(),
|
||||
} as unknown as ExpandableFlyoutApi;
|
||||
|
||||
jest.mock('@kbn/expandable-flyout');
|
||||
jest.mock('@kbn/expandable-flyout', () => ({
|
||||
useExpandableFlyoutApi: jest.fn(),
|
||||
ExpandableFlyoutProvider: ({ children }: React.PropsWithChildren<{}>) => <>{children}</>,
|
||||
}));
|
||||
|
||||
const renderPrevalenceOverview = (contextValue: DocumentDetailsContext = mockContextValue) =>
|
||||
render(
|
||||
|
|
|
@ -10,7 +10,7 @@ import React, { useCallback, useMemo } from 'react';
|
|||
import { EuiBadge, EuiFlexGroup } from '@elastic/eui';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import { usePrevalence } from '../../shared/hooks/use_prevalence';
|
||||
import { PREVALENCE_TEST_ID } from './test_ids';
|
||||
import { useDocumentDetailsContext } from '../../shared/context';
|
||||
|
|
|
@ -19,7 +19,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_LINK_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
import { mockContextValue } from '../../shared/mocks/mock_context';
|
||||
|
||||
jest.mock('../hooks/use_session_preview');
|
||||
|
|
|
@ -9,7 +9,6 @@ import React, { type FC, useCallback } from 'react';
|
|||
import { TimelineTabs } from '@kbn/securitysolution-data-table';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { useUiSetting$ } from '@kbn/kibana-react-plugin/public';
|
||||
import { ENABLE_VISUALIZATIONS_IN_FLYOUT_SETTING } from '../../../../../common/constants';
|
||||
import { useLicense } from '../../../../common/hooks/use_license';
|
||||
|
@ -18,6 +17,7 @@ import { useSessionPreview } from '../hooks/use_session_preview';
|
|||
import { useInvestigateInTimeline } from '../../../../detections/components/alerts_table/timeline_actions/use_investigate_in_timeline';
|
||||
import { useDocumentDetailsContext } from '../../shared/context';
|
||||
import { ALERTS_ACTIONS } from '../../../../common/lib/apm/user_actions';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import { SESSION_PREVIEW_TEST_ID } from './test_ids';
|
||||
import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction';
|
||||
import { setActiveTabTimeline } from '../../../../timelines/store/actions';
|
||||
|
|
|
@ -28,7 +28,7 @@ import {
|
|||
EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID,
|
||||
EXPANDABLE_PANEL_LOADING_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '@kbn/security-solution-common';
|
||||
} from '../../../shared/components/test_ids';
|
||||
|
||||
jest.mock('@kbn/expandable-flyout');
|
||||
jest.mock('../../shared/context');
|
||||
|
|
|
@ -10,7 +10,7 @@ import React, { useCallback, useMemo } from 'react';
|
|||
import { EuiFlexGroup } from '@elastic/eui';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import { useFetchThreatIntelligence } from '../hooks/use_fetch_threat_intelligence';
|
||||
import { InsightsSummaryRow } from './insights_summary_row';
|
||||
import { useDocumentDetailsContext } from '../../shared/context';
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
import type { FC } from 'react';
|
||||
import React, { useMemo } from 'react';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { FLYOUT_BODY_TEST_ID } from './test_ids';
|
||||
import type { RightPanelPaths } from '.';
|
||||
import type { RightPanelTabType } from './tabs';
|
||||
import { FlyoutBody } from '../../shared/components/flyout_body';
|
||||
|
||||
export interface PanelContentProps {
|
||||
/**
|
||||
|
|
|
@ -9,9 +9,10 @@ import type { EuiFlyoutHeader } from '@elastic/eui';
|
|||
import { EuiSpacer, EuiTab } from '@elastic/eui';
|
||||
import type { FC } from 'react';
|
||||
import React, { memo, useMemo } from 'react';
|
||||
import { FlyoutHeader, FlyoutHeaderTabs } from '@kbn/security-solution-common';
|
||||
import type { RightPanelPaths } from '.';
|
||||
import type { RightPanelTabType } from './tabs';
|
||||
import { FlyoutHeader } from '../../shared/components/flyout_header';
|
||||
import { FlyoutHeaderTabs } from '../../shared/components/flyout_header_tabs';
|
||||
import { AlertHeaderTitle } from './components/alert_header_title';
|
||||
import { EventHeaderTitle } from './components/event_header_title';
|
||||
import { useDocumentDetailsContext } from '../shared/context';
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import type { FC } from 'react';
|
||||
import React, { memo, useCallback } from 'react';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FlyoutNavigation } from '@kbn/security-solution-common';
|
||||
import { useKibana } from '../../../common/lib/kibana';
|
||||
import { HeaderActions } from './components/header_actions';
|
||||
import { FlyoutNavigation } from '../../shared/components/flyout_navigation';
|
||||
import { DocumentDetailsLeftPanelKey } from '../shared/constants/panel_keys';
|
||||
import { useDocumentDetailsContext } from '../shared/context';
|
||||
|
||||
|
|
|
@ -9,8 +9,9 @@ import type { BrowserFields, TimelineEventsDetailsItem } from '@kbn/timelines-pl
|
|||
import React, { createContext, memo, useContext, useMemo } from 'react';
|
||||
import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs';
|
||||
import { TableId } from '@kbn/securitysolution-data-table';
|
||||
import { FlyoutError, FlyoutLoading } from '@kbn/security-solution-common/src/flyout';
|
||||
import { useEventDetails } from './hooks/use_event_details';
|
||||
import { FlyoutError } from '../../shared/components/flyout_error';
|
||||
import { FlyoutLoading } from '../../shared/components/flyout_loading';
|
||||
import type { SearchHit } from '../../../../common/search_strategy';
|
||||
import { useBasicDataFromDetailsData } from './hooks/use_basic_data_from_details_data';
|
||||
import type { DocumentDetailsProps } from './types';
|
||||
|
|
|
@ -9,7 +9,7 @@ import { EuiText, EuiCode, type EuiTourStepProps } from '@elastic/eui';
|
|||
import React from 'react';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { HEADER_NAVIGATION_BUTTON_TEST_ID } from '@kbn/security-solution-common';
|
||||
import { HEADER_NAVIGATION_BUTTON_TEST_ID } from '../../../shared/components/test_ids';
|
||||
import { OVERVIEW_TAB_LABEL_TEST_ID } from '../../right/test_ids';
|
||||
import { RULE_SUMMARY_BUTTON_TEST_ID } from '../../right/components/test_ids';
|
||||
import {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { EuiLink, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
|||
import React, { useCallback } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FlyoutFooter } from '@kbn/security-solution-common';
|
||||
import { FlyoutFooter } from '../../shared/components/flyout_footer';
|
||||
import { HostPanelKey } from '../host_right';
|
||||
|
||||
export interface HostPreviewPanelFooterProps {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { EuiHorizontalRule } from '@elastic/eui';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { FlyoutBody } from '../../shared/components/flyout_body';
|
||||
import { EntityInsight } from '../../../cloud_security_posture/components/entity_insight';
|
||||
import { AssetCriticalityAccordion } from '../../../entity_analytics/components/asset_criticality/asset_criticality_selector';
|
||||
import { FlyoutRiskSummary } from '../../../entity_analytics/components/risk_summary_flyout/risk_summary';
|
||||
|
|
|
@ -9,11 +9,12 @@ import { EuiSpacer, EuiBadge, EuiText, EuiFlexItem, EuiFlexGroup } from '@elasti
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import React, { useMemo } from 'react';
|
||||
import { SecurityPageName } from '@kbn/security-solution-navigation';
|
||||
import { FlyoutHeader, FlyoutTitle } from '@kbn/security-solution-common';
|
||||
import type { HostItem } from '../../../../common/search_strategy';
|
||||
import { getHostDetailsUrl } from '../../../common/components/link_to';
|
||||
import { SecuritySolutionLinkAnchor } from '../../../common/components/links';
|
||||
import { PreferenceFormattedDate } from '../../../common/components/formatted_date';
|
||||
import { FlyoutHeader } from '../../shared/components/flyout_header';
|
||||
import { FlyoutTitle } from '../../shared/components/flyout_title';
|
||||
import type { ObservedEntityData } from '../shared/components/observed_entity/types';
|
||||
|
||||
interface HostPanelHeaderProps {
|
||||
|
|
|
@ -9,7 +9,6 @@ import React, { useCallback, useMemo } from 'react';
|
|||
import type { FlyoutPanelProps } from '@kbn/expandable-flyout';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
|
||||
import { FlyoutLoading, FlyoutNavigation } from '@kbn/security-solution-common';
|
||||
import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common';
|
||||
import { useMisconfigurationPreview } from '@kbn/cloud-security-posture/src/hooks/use_misconfiguration_preview';
|
||||
import { useVulnerabilitiesPreview } from '@kbn/cloud-security-posture/src/hooks/use_vulnerabilities_preview';
|
||||
|
@ -26,6 +25,8 @@ import { useGlobalTime } from '../../../common/containers/use_global_time';
|
|||
import type { HostItem } from '../../../../common/search_strategy';
|
||||
import { buildHostNamesFilter } from '../../../../common/search_strategy';
|
||||
import { RiskScoreEntity } from '../../../../common/entity_analytics/risk_engine';
|
||||
import { FlyoutLoading } from '../../shared/components/flyout_loading';
|
||||
import { FlyoutNavigation } from '../../shared/components/flyout_navigation';
|
||||
import { HostPanelContent } from './content';
|
||||
import { HostPanelHeader } from './header';
|
||||
import { AnomalyTableProvider } from '../../../common/components/ml/anomaly/anomaly_table_provider';
|
||||
|
|
|
@ -9,7 +9,7 @@ import { useEuiBackgroundColor } from '@elastic/eui';
|
|||
import type { VFC } from 'react';
|
||||
import React, { useMemo } from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { FlyoutBody } from '../../../../shared/components/flyout_body';
|
||||
import type { EntityDetailsLeftPanelTab, LeftPanelTabsType } from './left_panel_header';
|
||||
|
||||
export interface PanelContentProps {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { EuiTab, EuiTabs, useEuiBackgroundColor } from '@elastic/eui';
|
|||
import type { ReactElement, VFC } from 'react';
|
||||
import React, { memo } from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
import { FlyoutHeader } from '@kbn/security-solution-common';
|
||||
import { FlyoutHeader } from '../../../../shared/components/flyout_header';
|
||||
|
||||
export type LeftPanelTabsType = Array<{
|
||||
id: EntityDetailsLeftPanelTab;
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import React, { useMemo } from 'react';
|
||||
import type { FlyoutPanelProps, PanelPath } from '@kbn/expandable-flyout';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FlyoutLoading } from '@kbn/security-solution-common';
|
||||
import { useManagedUser } from '../shared/hooks/use_managed_user';
|
||||
import { useTabs } from './tabs';
|
||||
import { FlyoutLoading } from '../../shared/components/flyout_loading';
|
||||
import type {
|
||||
EntityDetailsLeftPanelTab,
|
||||
LeftPanelTabsType,
|
||||
|
|
|
@ -12,10 +12,10 @@ import { FormattedMessage } from '@kbn/i18n-react';
|
|||
import type { EuiButtonGroupOptionProps } from '@elastic/eui';
|
||||
import { EuiButtonGroup } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { JsonTab } from '../../../document_details/right/tabs/json_tab';
|
||||
import { TableTab } from '../../../document_details/right/tabs/table_tab';
|
||||
import { FLYOUT_BODY_TEST_ID, JSON_TAB_TEST_ID, TABLE_TAB_TEST_ID } from './test_ids';
|
||||
import { FlyoutBody } from '../../../shared/components/flyout_body';
|
||||
export type RightPanelPaths = 'overview' | 'table' | 'json';
|
||||
|
||||
export interface AssetDocumentPanelProps extends FlyoutPanelProps {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { EuiLink, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
|||
import React, { useCallback } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FlyoutFooter } from '@kbn/security-solution-common';
|
||||
import { FlyoutFooter } from '../../shared/components/flyout_footer';
|
||||
import { UserPanelKey } from '../user_right';
|
||||
|
||||
export interface UserPreviewPanelFooterProps {
|
||||
|
|
|
@ -11,14 +11,13 @@ import React from 'react';
|
|||
import { css } from '@emotion/react';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { get } from 'lodash/fp';
|
||||
import { ExpandablePanel } from '@kbn/security-solution-common';
|
||||
import { EntityDetailsLeftPanelTab } from '../../shared/components/left_panel/left_panel_header';
|
||||
import { ExpandablePanel } from '../../../shared/components/expandable_panel';
|
||||
import type { ManagedUserFields } from '../../../../../common/search_strategy/security_solution/users/managed_details';
|
||||
|
||||
import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date';
|
||||
import { ONE_WEEK_IN_HOURS } from '../../shared/constants';
|
||||
import { UserAssetTableType } from '../../../../explore/users/store/model';
|
||||
|
||||
interface ManagedUserAccordionProps {
|
||||
children: React.ReactNode;
|
||||
title: string;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import { EuiHorizontalRule } from '@elastic/eui';
|
||||
|
||||
import React from 'react';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features';
|
||||
import { AssetCriticalityAccordion } from '../../../entity_analytics/components/asset_criticality/asset_criticality_selector';
|
||||
|
||||
|
@ -19,6 +18,7 @@ import { ManagedUser } from './components/managed_user';
|
|||
import type { ManagedUserData } from './types';
|
||||
import type { RiskScoreEntity, UserItem } from '../../../../common/search_strategy';
|
||||
import { USER_PANEL_RISK_SCORE_QUERY_ID } from '.';
|
||||
import { FlyoutBody } from '../../shared/components/flyout_body';
|
||||
import { ObservedEntity } from '../shared/components/observed_entity';
|
||||
import type { ObservedEntityData } from '../shared/components/observed_entity/types';
|
||||
import { useObservedUserItems } from './hooks/use_observed_user_items';
|
||||
|
|
|
@ -10,7 +10,6 @@ import { FormattedMessage } from '@kbn/i18n-react';
|
|||
import React, { useMemo } from 'react';
|
||||
import { max } from 'lodash/fp';
|
||||
import { SecurityPageName } from '@kbn/security-solution-navigation';
|
||||
import { FlyoutHeader, FlyoutTitle } from '@kbn/security-solution-common';
|
||||
import type { UserItem } from '../../../../common/search_strategy';
|
||||
import { ManagedUserDatasetKey } from '../../../../common/search_strategy/security_solution/users/managed_details';
|
||||
import { getUsersDetailsUrl } from '../../../common/components/link_to/redirect_to_users';
|
||||
|
@ -18,6 +17,8 @@ import type { ManagedUserData } from './types';
|
|||
|
||||
import { SecuritySolutionLinkAnchor } from '../../../common/components/links';
|
||||
import { PreferenceFormattedDate } from '../../../common/components/formatted_date';
|
||||
import { FlyoutHeader } from '../../shared/components/flyout_header';
|
||||
import { FlyoutTitle } from '../../shared/components/flyout_title';
|
||||
import type { ObservedEntityData } from '../shared/components/observed_entity/types';
|
||||
|
||||
interface UserPanelHeaderProps {
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
import React, { useCallback, useMemo } from 'react';
|
||||
import type { FlyoutPanelProps } from '@kbn/expandable-flyout';
|
||||
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
|
||||
import { FlyoutLoading, FlyoutNavigation } from '@kbn/security-solution-common/src/flyout';
|
||||
import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common';
|
||||
import { useMisconfigurationPreview } from '@kbn/cloud-security-posture/src/hooks/use_misconfiguration_preview';
|
||||
import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common';
|
||||
import { useRefetchQueryById } from '../../../entity_analytics/api/hooks/use_refetch_query_by_id';
|
||||
import type { Refetch } from '../../../common/types';
|
||||
import { RISK_INPUTS_TAB_QUERY_ID } from '../../../entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab';
|
||||
|
@ -26,6 +25,8 @@ import { useGlobalTime } from '../../../common/containers/use_global_time';
|
|||
import { AnomalyTableProvider } from '../../../common/components/ml/anomaly/anomaly_table_provider';
|
||||
import { buildUserNamesFilter } from '../../../../common/search_strategy';
|
||||
import { RiskScoreEntity } from '../../../../common/entity_analytics/risk_engine';
|
||||
import { FlyoutLoading } from '../../shared/components/flyout_loading';
|
||||
import { FlyoutNavigation } from '../../shared/components/flyout_navigation';
|
||||
import { UserPanelContent } from './content';
|
||||
import { UserPanelHeader } from './header';
|
||||
import { UserDetailsPanelKey } from '../user_details_left';
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
import type { FC } from 'react';
|
||||
import React, { memo } from 'react';
|
||||
import { EuiSpacer } from '@elastic/eui';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { NetworkDetails } from './components/network_details';
|
||||
import { FlyoutBody } from '../shared/components/flyout_body';
|
||||
import type { FlowTargetSourceDest } from '../../../common/search_strategy';
|
||||
|
||||
export interface PanelContentProps {
|
||||
|
|
|
@ -9,10 +9,11 @@ import type { FC } from 'react';
|
|||
import React, { memo, useMemo } from 'react';
|
||||
import type { EuiFlyoutHeader } from '@elastic/eui';
|
||||
import { SecurityPageName } from '@kbn/deeplinks-security';
|
||||
import { FlyoutHeader, FlyoutTitle } from '@kbn/security-solution-common';
|
||||
import { getNetworkDetailsUrl } from '../../common/components/link_to';
|
||||
import { SecuritySolutionLinkAnchor } from '../../common/components/links';
|
||||
import type { FlowTargetSourceDest } from '../../../common/search_strategy';
|
||||
import { FlyoutHeader } from '../shared/components/flyout_header';
|
||||
import { FlyoutTitle } from '../shared/components/flyout_title';
|
||||
import { encodeIpv6 } from '../../common/lib/helpers';
|
||||
|
||||
export interface PanelHeaderProps extends React.ComponentProps<typeof EuiFlyoutHeader> {
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import React, { memo } from 'react';
|
||||
import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FlyoutFooter } from '@kbn/security-solution-common';
|
||||
import { RULE_PREVIEW_FOOTER_TEST_ID, RULE_PREVIEW_OPEN_RULE_FLYOUT_TEST_ID } from './test_ids';
|
||||
import { useRuleDetailsLink } from '../../document_details/shared/hooks/use_rule_details_link';
|
||||
import { FlyoutFooter } from '../../shared/components/flyout_footer';
|
||||
|
||||
/**
|
||||
* Footer in rule preview panel
|
||||
|
|
|
@ -8,7 +8,6 @@ import React, { memo } from 'react';
|
|||
import { EuiText, EuiHorizontalRule, EuiSpacer, EuiPanel } from '@elastic/eui';
|
||||
import { css } from '@emotion/css';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { FlyoutBody } from '@kbn/security-solution-common';
|
||||
import { ExpandableSection } from '../../document_details/right/components/expandable_section';
|
||||
import { RuleAboutSection } from '../../../detection_engine/rule_management/components/rule_details/rule_about_section';
|
||||
import { RuleScheduleSection } from '../../../detection_engine/rule_management/components/rule_details/rule_schedule_section';
|
||||
|
@ -23,6 +22,7 @@ import {
|
|||
ACTIONS_TEST_ID,
|
||||
} from './test_ids';
|
||||
import type { RuleResponse } from '../../../../common/api/detection_engine';
|
||||
import { FlyoutBody } from '../../shared/components/flyout_body';
|
||||
|
||||
const panelViewStyle = css`
|
||||
dt {
|
||||
|
|
|
@ -15,7 +15,6 @@ import {
|
|||
EuiBadge,
|
||||
EuiLink,
|
||||
} from '@elastic/eui';
|
||||
import { FlyoutHeader, FlyoutTitle } from '@kbn/security-solution-common';
|
||||
import { DELETED_RULE } from '../../../detection_engine/rule_details_ui/pages/rule_details/translations';
|
||||
import { CreatedBy, UpdatedBy } from '../../../detections/components/rules/rule_info';
|
||||
import {
|
||||
|
@ -27,6 +26,8 @@ import {
|
|||
} from './test_ids';
|
||||
import type { RuleResponse } from '../../../../common/api/detection_engine';
|
||||
import { useRuleDetailsLink } from '../../document_details/shared/hooks/use_rule_details_link';
|
||||
import { FlyoutHeader } from '../../shared/components/flyout_header';
|
||||
import { FlyoutTitle } from '../../shared/components/flyout_title';
|
||||
|
||||
export interface PanelHeaderProps {
|
||||
/**
|
||||
|
|
|
@ -7,13 +7,15 @@
|
|||
|
||||
import React, { memo } from 'react';
|
||||
import type { FlyoutPanelProps } from '@kbn/expandable-flyout';
|
||||
import { FlyoutLoading, FlyoutError, FlyoutNavigation } from '@kbn/security-solution-common';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { PanelContent } from './content';
|
||||
import { PanelHeader } from './header';
|
||||
import { PreviewFooter } from '../preview/footer';
|
||||
import { useRuleDetails } from '../hooks/use_rule_details';
|
||||
import { LOADING_TEST_ID } from './test_ids';
|
||||
import { FlyoutLoading } from '../../shared/components/flyout_loading';
|
||||
import { FlyoutNavigation } from '../../shared/components/flyout_navigation';
|
||||
import { FlyoutError } from '../../shared/components/flyout_error';
|
||||
|
||||
export interface RulePanelExpandableFlyoutProps extends FlyoutPanelProps {
|
||||
key: 'rule-panel' | 'rule-preview-panel';
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
EXPANDABLE_PANEL_CONTENT_TEST_ID,
|
||||
EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID,
|
||||
EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID,
|
||||
} from '../test_ids';
|
||||
} from './test_ids';
|
||||
import { ThemeProvider } from '@emotion/react';
|
||||
import { ExpandablePanel } from './expandable_panel';
|
||||
|
|
@ -110,7 +110,7 @@ export const ExpandablePanel: FC<PropsWithChildren<ExpandablePanelPanelProps>> =
|
|||
<EuiButtonIcon
|
||||
data-test-subj={`${dataTestSubj}ToggleIcon`}
|
||||
aria-label={i18n.translate(
|
||||
'securitySolutionPackages.flyout.shared.ExpandablePanelButtonIconAriaLabel',
|
||||
'xpack.securitySolution.flyout.shared.ExpandablePanelButtonIconAriaLabel',
|
||||
{
|
||||
defaultMessage: 'Expandable panel toggle',
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ export const ExpandablePanel: FC<PropsWithChildren<ExpandablePanelPanelProps>> =
|
|||
<EuiSkeletonText
|
||||
data-test-subj={`${dataTestSubj}Loading`}
|
||||
contentAriaLabel={i18n.translate(
|
||||
'securitySolutionPackages.flyout.shared.expandablePanelLoadingAriaLabel',
|
||||
'xpack.securitySolution.flyout.shared.expandablePanelLoadingAriaLabel',
|
||||
{ defaultMessage: 'expandable panel' }
|
||||
)}
|
||||
/>
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
import { __IntlProvider as IntlProvider } from '@kbn/i18n-react';
|
||||
import { render } from '@testing-library/react';
|
||||
import { FlyoutError } from './flyout_error';
|
||||
import { FLYOUT_ERROR_TEST_ID } from '../test_ids';
|
||||
import { FLYOUT_ERROR_TEST_ID } from './test_ids';
|
||||
|
||||
describe('<FlyoutError />', () => {
|
||||
it('should render error title and body', () => {
|
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
import { EuiEmptyPrompt, EuiFlexItem } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { FLYOUT_ERROR_TEST_ID } from '../test_ids';
|
||||
import { FLYOUT_ERROR_TEST_ID } from './test_ids';
|
||||
|
||||
/**
|
||||
* Use this when you need to show an error state in the flyout
|
||||
|
@ -21,7 +21,7 @@ export const FlyoutError: React.VFC = () => (
|
|||
title={
|
||||
<h2>
|
||||
<FormattedMessage
|
||||
id="securitySolutionPackages.flyout.shared.errorTitle"
|
||||
id="xpack.securitySolution.flyout.shared.errorTitle"
|
||||
defaultMessage="Unable to display {title}."
|
||||
values={{ title: 'data' }}
|
||||
/>
|
||||
|
@ -30,7 +30,7 @@ export const FlyoutError: React.VFC = () => (
|
|||
body={
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="securitySolutionPackages.flyout.shared.errorDescription"
|
||||
id="xpack.securitySolution.flyout.shared.errorDescription"
|
||||
defaultMessage="There was an error displaying {message}."
|
||||
values={{ message: 'data' }}
|
||||
/>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue