diff --git a/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/asset_details_props.ts b/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/asset_details_props.ts index 05e17c16eb92..b6e35dbf5177 100644 --- a/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/asset_details_props.ts +++ b/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/asset_details_props.ts @@ -6,42 +6,42 @@ */ import { i18n } from '@kbn/i18n'; -import { type AssetDetailsProps, FlyoutTabIds, type Tab } from '../../../types'; +import { type AssetDetailsProps, ContentTabIds, type Tab } from '../../../types'; const links: AssetDetailsProps['links'] = ['alertRule', 'nodeDetails', 'apmServices']; const tabs: Tab[] = [ { - id: FlyoutTabIds.OVERVIEW, + id: ContentTabIds.OVERVIEW, name: i18n.translate('xpack.infra.nodeDetails.tabs.overview.title', { defaultMessage: 'Overview', }), }, { - id: FlyoutTabIds.LOGS, + id: ContentTabIds.LOGS, name: i18n.translate('xpack.infra.nodeDetails.tabs.logs', { defaultMessage: 'Logs', }), }, { - id: FlyoutTabIds.METADATA, + id: ContentTabIds.METADATA, name: i18n.translate('xpack.infra.metrics.nodeDetails.tabs.metadata', { defaultMessage: 'Metadata', }), }, { - id: FlyoutTabIds.PROCESSES, + id: ContentTabIds.PROCESSES, name: i18n.translate('xpack.infra.metrics.nodeDetails.tabs.processes', { defaultMessage: 'Processes', }), }, { - id: FlyoutTabIds.ANOMALIES, + id: ContentTabIds.ANOMALIES, name: i18n.translate('xpack.infra.nodeDetails.tabs.anomalies', { defaultMessage: 'Anomalies', }), }, { - id: FlyoutTabIds.LINK_TO_APM, + id: ContentTabIds.LINK_TO_APM, name: i18n.translate('xpack.infra.infra.nodeDetails.apmTabLabel', { defaultMessage: 'APM', }), diff --git a/x-pack/plugins/infra/public/components/asset_details/constants.ts b/x-pack/plugins/infra/public/components/asset_details/constants.ts index 726f47450d0c..cdd5b9508215 100644 --- a/x-pack/plugins/infra/public/components/asset_details/constants.ts +++ b/x-pack/plugins/infra/public/components/asset_details/constants.ts @@ -8,3 +8,5 @@ export const ASSET_DETAILS_FLYOUT_COMPONENT_NAME = 'infraAssetDetailsFlyout'; export const METRIC_CHART_HEIGHT = 300; export const APM_HOST_FILTER_FIELD = 'host.hostname'; + +export const ASSET_DETAILS_URL_STATE_KEY = 'assetDetails'; diff --git a/x-pack/plugins/infra/public/components/asset_details/content/content.tsx b/x-pack/plugins/infra/public/components/asset_details/content/content.tsx index c9d622cf0149..0cf51f1fff3d 100644 --- a/x-pack/plugins/infra/public/components/asset_details/content/content.tsx +++ b/x-pack/plugins/infra/public/components/asset_details/content/content.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { DatePicker } from '../date_picker/date_picker'; import { useTabSwitcherContext } from '../hooks/use_tab_switcher'; import { Anomalies, Metadata, Processes, Osquery, Logs, Overview } from '../tabs'; -import { FlyoutTabIds } from '../types'; +import { ContentTabIds } from '../types'; export const Content = () => { return ( @@ -18,31 +18,31 @@ export const Content = () => { - + - + - + - + - + - + @@ -50,11 +50,11 @@ export const Content = () => { ); }; -const DatePickerWrapper = ({ visibleFor }: { visibleFor: FlyoutTabIds[] }) => { +const DatePickerWrapper = ({ visibleFor }: { visibleFor: ContentTabIds[] }) => { const { activeTabId } = useTabSwitcherContext(); return ( -