Skip to content

Commit

Permalink
[Security Solution][Alert details] - update telemetry property to bet…
Browse files Browse the repository at this point in the history
…ter reflect where the flyout is opened from (elastic#180984)
  • Loading branch information
PhilippeOberti authored Apr 18, 2024
1 parent d61b53f commit cfee0fa
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const CaseContainerComponent: React.FC = () => {
},
});
telemetry.reportDetailsFlyoutOpened({
tableId: TimelineId.casePage,
location: TimelineId.casePage,
panel: 'right',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const RowActionComponent = ({
},
});
telemetry.reportDetailsFlyoutOpened({
tableId,
location: tableId,
panel: 'right',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { TelemetryEventTypes } from '../../constants';
export const DocumentDetailsFlyoutOpenedEvent: TelemetryEvent = {
eventType: TelemetryEventTypes.DetailsFlyoutOpened,
schema: {
tableId: {
location: {
type: 'text',
_meta: {
description: 'Table ID',
Expand All @@ -31,7 +31,7 @@ export const DocumentDetailsFlyoutOpenedEvent: TelemetryEvent = {
export const DocumentDetailsTabClickedEvent: TelemetryEvent = {
eventType: TelemetryEventTypes.DetailsFlyoutTabClicked,
schema: {
tableId: {
location: {
type: 'text',
_meta: {
description: 'Table ID',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import type { RootSchema } from '@kbn/analytics-client';
import type { TelemetryEventTypes } from '../../constants';

export interface ReportDetailsFlyoutOpenedParams {
tableId: string;
location: string;
panel: 'left' | 'right' | 'preview';
}

export interface ReportDetailsFlyoutTabClickedParams {
tableId: string;
location: string;
panel: 'left' | 'right';
tabId: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const LeftPanel: FC<Partial<LeftPanelProps>> = memo(({ path }) => {
},
});
telemetry.reportDetailsFlyoutTabClicked({
tableId: scopeId,
location: scopeId,
panel: 'left',
tabId,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const InsightsTab: React.FC = memo(() => {
},
});
telemetry.reportDetailsFlyoutTabClicked({
tableId: scopeId,
location: scopeId,
panel: 'left',
tabId: optionId,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const AlertDescription: FC = () => {
},
});
telemetry.reportDetailsFlyoutOpened({
tableId: scopeId,
location: scopeId,
panel: 'preview',
});
}, [eventId, openPreviewPanel, indexName, scopeId, ruleId, telemetry]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const Reason: FC = () => {
},
});
telemetry.reportDetailsFlyoutOpened({
tableId: scopeId,
location: scopeId,
panel: 'preview',
});
}, [eventId, openPreviewPanel, indexName, scopeId, telemetry]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const RightPanel: FC<Partial<RightPanelProps>> = memo(({ path }) => {
storage.set(FLYOUT_STORAGE_KEYS.RIGHT_PANEL_SELECTED_TABS, tabId);

telemetry.reportDetailsFlyoutTabClicked({
tableId: scopeId,
location: scopeId,
panel: 'right',
tabId,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const PanelNavigation: FC<PanelNavigationProps> = memo(({ flyoutIsExpanda
},
});
telemetry.reportDetailsFlyoutOpened({
tableId: scopeId,
location: scopeId,
panel: 'left',
});
}, [eventId, openLeftPanel, indexName, scopeId, telemetry]);
Expand Down

0 comments on commit cfee0fa

Please sign in to comment.