mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Observability Onboarding] Update links for integration buttons in observability solutions (#184477)
## Summary Continuation of https://github.com/elastic/kibana/pull/184164. Changes the integration links for metrics and logs to link to the new onboarding flow.
This commit is contained in:
parent
4ddec38be0
commit
5f2e0c613a
2 changed files with 10 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
|||
import React, { useEffect } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public';
|
||||
import { useKibana } from '@kbn/kibana-react-plugin/public';
|
||||
import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability';
|
||||
import { NoDataConfig } from '@kbn/shared-ux-page-kibana-template';
|
||||
import { useKibanaContextForPlugin } from '../../../hooks/use_kibana';
|
||||
|
||||
|
@ -29,13 +29,13 @@ export const LogsPageTemplate: React.FC<LogsPageTemplateProps> = ({
|
|||
observabilityShared: {
|
||||
navigation: { PageTemplate },
|
||||
},
|
||||
share,
|
||||
docLinks,
|
||||
},
|
||||
} = useKibanaContextForPlugin();
|
||||
|
||||
const { http } = useKibana().services;
|
||||
const basePath = http!.basePath.get();
|
||||
|
||||
const onboardingLocator = share.url.locators.get(OBSERVABILITY_ONBOARDING_LOCATOR);
|
||||
const href = onboardingLocator?.getRedirectUrl({ category: 'logs' });
|
||||
const { setScreenContext } = observabilityAIAssistant?.service || {};
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -79,7 +79,7 @@ export const LogsPageTemplate: React.FC<LogsPageTemplateProps> = ({
|
|||
defaultMessage:
|
||||
'Use the Elastic Agent or Beats to send logs to Elasticsearch. We make it easy with integrations for many popular systems and apps.',
|
||||
}),
|
||||
href: basePath + `/app/integrations/browse`,
|
||||
href,
|
||||
},
|
||||
},
|
||||
docsLink: docLinks.links.observability.guide,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public';
|
||||
import type { NoDataConfig } from '@kbn/shared-ux-page-kibana-template';
|
||||
|
@ -30,10 +31,13 @@ export const MetricsPageTemplate: React.FC<LazyObservabilityPageTemplateProps> =
|
|||
observabilityShared: {
|
||||
navigation: { PageTemplate },
|
||||
},
|
||||
share,
|
||||
docLinks,
|
||||
},
|
||||
} = useKibanaContextForPlugin();
|
||||
|
||||
const onboardingLocator = share.url.locators.get(OBSERVABILITY_ONBOARDING_LOCATOR);
|
||||
const href = onboardingLocator?.getRedirectUrl({ category: 'infra' });
|
||||
const { source, error: sourceError, loadSource, isLoading } = useSourceContext();
|
||||
const { error: dataViewLoadError, refetch: loadDataView } = useMetricsDataViewContext();
|
||||
const { remoteClustersExist, metricIndicesExist } = source?.status ?? {};
|
||||
|
@ -48,6 +52,7 @@ export const MetricsPageTemplate: React.FC<LazyObservabilityPageTemplateProps> =
|
|||
beats: {
|
||||
title: noMetricIndicesPromptPrimaryActionTitle,
|
||||
description: noMetricIndicesPromptDescription,
|
||||
href,
|
||||
},
|
||||
},
|
||||
docsLink: docLinks.links.observability.guide,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue