From 1da85c654444a22a89def1f25ec9ec17fe86bbaa Mon Sep 17 00:00:00 2001 From: Abdul Zahid Date: Fri, 5 Jan 2024 20:51:20 +0100 Subject: [PATCH] Merge fix. --- .../transaction_action_menu/transaction_action_menu.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx b/x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx index 843fb551a8ced..fe3cd90222ef4 100644 --- a/x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx +++ b/x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx @@ -27,7 +27,6 @@ import { } from '@kbn/deeplinks-observability/locators'; import type { ProfilingLocators } from '@kbn/observability-shared-plugin/public'; import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; -import { useDataViewId } from '../../../hooks/use_data_view_id'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { ApmFeatureFlagName } from '../../../../common/apm_feature_flags'; import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; @@ -39,6 +38,7 @@ import { useProfilingPlugin } from '../../../hooks/use_profiling_plugin'; import { CustomLinkMenuSection } from './custom_link_menu_section'; import { getSections } from './sections'; import { CustomLinkFlyout } from './custom_link_flyout'; +import { useAdHocApmDataView } from '../../../hooks/use_adhoc_apm_data_view'; interface Props { readonly transaction?: Transaction; @@ -134,7 +134,7 @@ function ActionMenuSections({ const { core, uiActions, share } = useApmPluginContext(); const location = useLocation(); const apmRouter = useApmRouter(); - const dataViewId = useDataViewId(); + const { dataView } = useAdHocApmDataView(); const allDatasetsLocator = share.url.locators.get( ALL_DATASETS_LOCATOR_ID @@ -166,7 +166,7 @@ function ActionMenuSections({ environment, allDatasetsLocator, logsLocators, - dataViewId, + dataViewId: dataView?.id, }); const externalMenuItems = useAsync(() => {