diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx index 97fcd5d920ff9..97b0424168f0a 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx @@ -13,6 +13,7 @@ import type { Filter } from '@kbn/es-query'; import { inputsModel, inputsSelectors, State } from '../../store'; import { inputsActions } from '../../store/actions'; import { ControlColumnProps, RowRenderer, TimelineId } from '../../../../common/types/timeline'; +import { APP_UI_ID } from '../../../../common/constants'; import { timelineSelectors, timelineActions } from '../../../timelines/store/timeline'; import type { SubsetTimelineModel, TimelineModel } from '../../../timelines/store/timeline/model'; import { Status } from '../../../../common/detection_engine/schemas/common/schemas'; @@ -174,6 +175,7 @@ const StatefulEventsViewerComponent: React.FC = ({ {timelinesUi.getTGrid<'embedded'>({ additionalFilters, + appId: APP_UI_ID, browserFields, bulkActions, columns, diff --git a/x-pack/plugins/timelines/public/components/index.tsx b/x-pack/plugins/timelines/public/components/index.tsx index ad2081af324cf..a99466676376a 100644 --- a/x-pack/plugins/timelines/public/components/index.tsx +++ b/x-pack/plugins/timelines/public/components/index.tsx @@ -14,7 +14,7 @@ import { Storage } from '../../../../../src/plugins/kibana_utils/public'; import type { DataPublicPluginStart } from '../../../../../src/plugins/data/public'; import { createStore } from '../store/t_grid'; -import { TGrid as TGridComponent } from './tgrid'; +import { TGrid as TGridComponent } from './t_grid'; import type { TGridProps } from '../types'; import { DragDropContextWrapper } from './drag_and_drop'; import { initialTGridState } from '../store/t_grid/reducer'; diff --git a/x-pack/plugins/timelines/public/components/rule_name/index.tsx b/x-pack/plugins/timelines/public/components/rule_name/index.tsx index 2bfaf9b03525e..766a7f4848495 100644 --- a/x-pack/plugins/timelines/public/components/rule_name/index.tsx +++ b/x-pack/plugins/timelines/public/components/rule_name/index.tsx @@ -14,31 +14,32 @@ import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; interface RuleNameProps { name: string; id: string; + appId: string; } const appendSearch = (search?: string) => isEmpty(search) ? '' : `${search?.startsWith('?') ? search : `?${search}`}`; -const RuleNameComponents = ({ name, id }: RuleNameProps) => { +const RuleNameComponents = ({ name, id, appId }: RuleNameProps) => { const { navigateToApp, getUrlForApp } = useKibana().services.application; const hrefRuleDetails = useMemo( () => - getUrlForApp('securitySolution', { + getUrlForApp(appId, { deepLinkId: 'rules', path: `/id/${id}${appendSearch(window.location.search)}`, }), - [getUrlForApp, id] + [getUrlForApp, id, appId] ); const goToRuleDetails = useCallback( (ev) => { ev.preventDefault(); - navigateToApp('securitySolution', { + navigateToApp(appId, { deepLinkId: 'rules', path: `/id/${id}${appendSearch(window.location.search)}`, }); }, - [navigateToApp, id] + [navigateToApp, id, appId] ); return ( // eslint-disable-next-line @elastic/eui/href-or-on-click diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx index bed3290f4d310..034e04adb51c9 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx @@ -89,6 +89,7 @@ const StatefulAlertStatusBulkActions = lazy( interface OwnProps { activePage: number; additionalControls?: React.ReactNode; + appId?: string; browserFields: BrowserFields; bulkActions?: BulkActionsProp; createFieldComponent?: CreateFieldComponentType; @@ -299,6 +300,7 @@ export const BodyComponent = React.memo( ({ activePage, additionalControls, + appId, browserFields, bulkActions = true, clearSelected, @@ -830,6 +832,7 @@ export const BodyComponent = React.memo( )} {tableView === 'eventRenderedView' && ( { const ruleName = get(item, `ecs.signal.rule.name`) ?? get(item, `ecs.${ALERT_RULE_NAME}`); const ruleId = get(item, `ecs.signal.rule.id`) ?? get(item, `ecs.${ALERT_RULE_UUID}`); - return ; + return ; }, }, { diff --git a/x-pack/plugins/timelines/public/components/tgrid.tsx b/x-pack/plugins/timelines/public/components/t_grid/index.tsx similarity index 78% rename from x-pack/plugins/timelines/public/components/tgrid.tsx rename to x-pack/plugins/timelines/public/components/t_grid/index.tsx index ff3404dc7f195..058261e6386cc 100644 --- a/x-pack/plugins/timelines/public/components/tgrid.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/index.tsx @@ -7,9 +7,9 @@ import React from 'react'; -import type { TGridProps } from '../types'; -import { TGridIntegrated, TGridIntegratedProps } from './t_grid/integrated'; -import { TGridStandalone, TGridStandaloneProps } from './t_grid/standalone'; +import type { TGridProps } from '../../types'; +import { TGridIntegrated, TGridIntegratedProps } from './integrated'; +import { TGridStandalone, TGridStandaloneProps } from './standalone'; export const TGrid = (props: TGridProps) => { const { type, ...componentsProps } = props; diff --git a/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx index 337b45810cd98..32d04f2a21b8a 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx @@ -94,6 +94,7 @@ const SECURITY_ALERTS_CONSUMERS = [AlertConsumers.SIEM]; export interface TGridIntegratedProps { additionalFilters: React.ReactNode; + appId: string; browserFields: BrowserFields; bulkActions?: BulkActionsProp; columns: ColumnHeaderOptions[]; @@ -138,6 +139,7 @@ export interface TGridIntegratedProps { const TGridIntegratedComponent: React.FC = ({ additionalFilters, + appId, browserFields, bulkActions = true, columns, @@ -350,6 +352,7 @@ const TGridIntegratedComponent: React.FC = ({