diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/add_metrics_callout/constants.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/add_metrics_callout/constants.ts index ca56a58875220..01da12c5f59ad 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/add_metrics_callout/constants.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/add_metrics_callout/constants.ts @@ -62,7 +62,7 @@ const containerDefaultActions = ( return { actions: { primary: { - href: locator?.getRedirectUrl({ category: OnboardingFlow.Infra }), + href: locator?.getRedirectUrl({ category: OnboardingFlow.Hosts }), label: defaultPrimaryActionLabel, }, link: { diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metrics/container_metrics.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metrics/container_metrics.tsx index f49fa026892b1..65d19f7693740 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metrics/container_metrics.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metrics/container_metrics.tsx @@ -14,6 +14,7 @@ import { MetricsTemplate } from './metrics_template'; import { DockerCharts, KubernetesContainerCharts } from '../../charts'; import { DOCKER_METRIC_TYPES, INTEGRATIONS, KUBERNETES_METRIC_TYPES } from '../../constants'; import { useIntegrationCheck } from '../../hooks/use_integration_check'; +import { AddMetricsCallout } from '../../add_metrics_callout'; export const ContainerMetrics = () => { const ref = useRef(null); @@ -29,7 +30,7 @@ export const ContainerMetrics = () => { }); if (!isDockerContainer && !isKubernetesContainer) { - return null; + return ; } return ( diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx index e4f0eee51dbc0..9ace5606599d7 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx @@ -27,8 +27,6 @@ import { AddMetricsCallout } from '../../add_metrics_callout'; import { AddMetricsCalloutKey } from '../../add_metrics_callout/constants'; import { useEntitySummary } from '../../hooks/use_entity_summary'; import { isMetricsSignal } from '../../utils/get_data_stream_types'; -import { INTEGRATIONS } from '../../constants'; -import { useIntegrationCheck } from '../../hooks/use_integration_check'; export const Overview = () => { const { dateRange } = useDatePickerContext(); @@ -50,10 +48,6 @@ export const Overview = () => { `infra.dismissedAddMetricsCallout.${addMetricsCalloutId}`, false ); - const isDockerContainer = useIntegrationCheck({ dependsOn: INTEGRATIONS.docker }); - const isKubernetesContainer = useIntegrationCheck({ - dependsOn: INTEGRATIONS.kubernetesContainer, - }); const metadataSummarySection = isFullPageView ? ( @@ -74,13 +68,7 @@ export const Overview = () => { return false; } - const { type } = asset; - const baseCondition = !isMetricsSignal(dataStreams); - - const isRelevantContainer = - type === 'container' && (isDockerContainer || isKubernetesContainer); - - return baseCondition && (type === 'host' || isRelevantContainer); + return !isMetricsSignal(dataStreams); }; const showAddMetricsCallout = shouldShowCallout(); diff --git a/x-pack/plugins/observability_solution/infra/public/components/shared/templates/no_data_config.ts b/x-pack/plugins/observability_solution/infra/public/components/shared/templates/no_data_config.ts index 3859f93ddc437..28e0d00c751a8 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/shared/templates/no_data_config.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/shared/templates/no_data_config.ts @@ -18,7 +18,7 @@ import { noMetricIndicesPromptDescription, noMetricIndicesPromptTitle } from '.. export enum OnboardingFlow { Infra = 'infra', - Hosts = 'logs', + Hosts = 'host', } interface NoDataConfigDetails { diff --git a/x-pack/test/functional/apps/infra/hosts_view.ts b/x-pack/test/functional/apps/infra/hosts_view.ts index dd6a420d27fbe..52b3484ed50e5 100644 --- a/x-pack/test/functional/apps/infra/hosts_view.ts +++ b/x-pack/test/functional/apps/infra/hosts_view.ts @@ -341,7 +341,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const currentUrl = await browser.getCurrentUrl(); const parsedUrl = new URL(currentUrl); const baseUrl = `${parsedUrl.protocol}//${parsedUrl.host}`; - const expectedUrlPattern = `${baseUrl}/app/observabilityOnboarding/?category=logs`; + const expectedUrlPattern = `${baseUrl}/app/observabilityOnboarding/?category=host`; expect(currentUrl).to.equal(expectedUrlPattern); }); });