Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ANALYZER_PREVIEW_BANNER = {
title: i18n.translate(
'xpack.securitySolution.flyout.left.visualizations.analyzer.panelPreviewTitle',
{
defaultMessage: 'Preview analyzer panels',
defaultMessage: 'Preview analyzer panel',
}
),
backgroundColor: 'warning',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import React, { memo, useCallback, useMemo } from 'react';
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
import { EuiPanel } from '@elastic/eui';
import type { Process } from '@kbn/session-view-plugin/common';
import { i18n } from '@kbn/i18n';
import type { CustomProcess } from '../../session_view/context';
import { useUserPrivileges } from '../../../../common/components/user_privileges';
import { SESSION_VIEW_TEST_ID } from './test_ids';
Expand All @@ -29,6 +30,14 @@ import { DocumentEventTypes } from '../../../../common/lib/telemetry';

export const SESSION_VIEW_ID = 'session-view';

export const SESSION_VIEWER_BANNER = {
title: i18n.translate('xpack.securitySolution.flyout.preview.sessionViewerTitle', {
defaultMessage: 'Preview session view panel',
}),
backgroundColor: 'warning',
textColor: 'warning',
};

/**
* Session view displayed in the document details expandable flyout left section under the Visualize tab
*/
Expand Down Expand Up @@ -107,6 +116,7 @@ export const SessionView: FC = memo(() => {
scopeId,
jumpToEntityId,
jumpToCursor,
banner: SESSION_VIEWER_BANNER,
},
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ describe('SessionPreviewContainer', () => {

const { getByTestId, queryByTestId } = renderSessionPreview({
...mockContextValue,
isPreview: true,
isPreviewMode: true,
});

expect(getByTestId(SESSION_PREVIEW_TEST_ID)).toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const SessionPreviewContainer: FC = () => {
indexName,
isFlyoutOpen: true,
scopeId,
isPreviewMode,
});

const iconType = useMemo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { useSessionViewPanelContext } from './context';
import type { SessionViewPanelTabType } from './tabs';
import * as tabs from './tabs';
import { DocumentDetailsSessionViewPanelKey } from '../shared/constants/panel_keys';
import { SESSION_VIEWER_BANNER } from '../left/components/session_view';

export const allTabs = [tabs.processTab, tabs.metadataTab, tabs.alertsTab];
export type SessionViewPanelPaths = 'process' | 'metadata' | 'alerts';
Expand Down Expand Up @@ -80,6 +81,7 @@ export const SessionViewPanel: FC<Partial<SessionViewPanelProps>> = memo(({ path
sessionStartTime,
scopeId,
investigatedAlertId,
banner: SESSION_VIEWER_BANNER,
},
});
},
Expand Down