diff --git a/x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx b/x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx
index 3915446edaeee..597f387c627b3 100644
--- a/x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx
@@ -13,6 +13,7 @@ import type { ObservabilityAIAssistantPluginStart } from '@kbn/observability-ai-
import { Storage } from '@kbn/kibana-utils-plugin/public';
import { NavigationWarningPromptProvider } from '@kbn/observability-shared-plugin/public';
import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public';
+import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import {
type KibanaEnvContext,
useKibanaContextForPluginProvider,
@@ -79,13 +80,19 @@ export const CoreProviders: React.FC = ({
const KibanaEnvContextForPluginProvider = useKibanaEnvironmentContextProvider(kibanaEnvironment);
return (
-
-
-
- {children}
-
-
-
+
+
+
+
+ {children}
+
+
+
+
);
};
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/components/services_tooltip_content.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/components/services_tooltip_content.tsx
index 5efcfc1ea4f56..6c5b00d735226 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/components/services_tooltip_content.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/components/services_tooltip_content.tsx
@@ -7,13 +7,10 @@
import React from 'react';
import { EuiText, EuiLink } from '@elastic/eui';
-import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { FormattedMessage } from '@kbn/i18n-react';
import { useLinkProps } from '@kbn/observability-shared-plugin/public';
-import { useKibanaContextForPlugin } from '../../../hooks/use_kibana';
export const ServicesTooltipContent = () => {
- const { services } = useKibanaContextForPlugin();
const linkProps = useLinkProps({
app: 'home',
hash: '/tutorial/apm',
@@ -25,14 +22,16 @@ export const ServicesTooltipContent = () => {
defaultMessage="Showing {apmTutorialLink} services detected on this host."
values={{
apmTutorialLink: (
-
-
-
-
-
+
+
+
),
}}
/>
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_alerts_page.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_alerts_page.tsx
index 5c1ec8521e344..e23fa128868b0 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_alerts_page.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_alerts_page.tsx
@@ -6,7 +6,6 @@
*/
import React from 'react';
import { encode } from '@kbn/rison';
-import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { FormattedMessage } from '@kbn/i18n-react';
import { EuiButtonEmpty, EuiLink } from '@elastic/eui';
import type { TimeRange } from '@kbn/es-query';
@@ -33,21 +32,19 @@ export const LinkToAlertsPage = ({ assetName, queryField, dateRange }: LinkToAle
);
return (
-
-
-
-
-
+
+
+
);
};
@@ -58,13 +55,15 @@ export const LinkToAlertsHomePage = () => {
const linkToAlertsPage = http.basePath.prepend(ALERTS_PATH);
return (
-
-
-
-
-
+
+
+
);
};
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_service.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_service.tsx
index 378697793d90b..b4e2ea57c9eaa 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_service.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_service.tsx
@@ -5,13 +5,11 @@
* 2.0.
*/
import React from 'react';
-import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { EuiBadge, EuiText } from '@elastic/eui';
import { AgentIcon } from '@kbn/custom-icons';
import { AgentName } from '@kbn/elastic-agent-utils';
import { i18n } from '@kbn/i18n';
import { useLinkProps } from '@kbn/observability-shared-plugin/public';
-import { useKibanaContextForPlugin } from '../../../hooks/use_kibana';
export interface LinkToApmServiceProps {
serviceName: string;
@@ -20,8 +18,6 @@ export interface LinkToApmServiceProps {
}
export const LinkToApmService = ({ serviceName, agentName, dateRange }: LinkToApmServiceProps) => {
- const { services } = useKibanaContextForPlugin();
-
const linkProps = useLinkProps({
app: 'apm',
pathname: `/services/${serviceName}/overview`,
@@ -31,24 +27,22 @@ export const LinkToApmService = ({ serviceName, agentName, dateRange }: LinkToAp
},
});
return (
-
-
-
- {agentName ? (
-
- ) : null}
- {serviceName}
-
-
-
+
+
+ {agentName ? (
+
+ ) : null}
+ {serviceName}
+
+
);
};
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_services.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_services.tsx
index a7a70d1466ac9..7be6b16d5e5a3 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_services.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_services.tsx
@@ -7,7 +7,6 @@
import React from 'react';
import { stringify } from 'querystring';
import { encode } from '@kbn/rison';
-import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { FormattedMessage } from '@kbn/i18n-react';
import { EuiButtonEmpty } from '@elastic/eui';
import { useKibanaContextForPlugin } from '../../../hooks/use_kibana';
@@ -32,20 +31,18 @@ export const LinkToApmServices = ({ assetName, apmField }: LinkToApmServicesProp
const linkToApmServices = http.basePath.prepend(`/app/apm/services?${queryString}`);
return (
-
-
-
-
-
+
+
+
);
};
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/logs/logs.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/logs/logs.tsx
index 5535488f45e7d..843bc8c363e8b 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/logs/logs.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/logs/logs.tsx
@@ -10,7 +10,6 @@ import useDebounce from 'react-use/lib/useDebounce';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import { EuiFieldSearch, EuiFlexGroup, EuiFlexItem, EuiButtonEmpty } from '@elastic/eui';
-import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { LogStream } from '@kbn/logs-shared-plugin/public';
import {
DEFAULT_LOG_VIEW,
@@ -107,20 +106,18 @@ export const Logs = () => {
/>
-
-
-
-
-
+
+
+
diff --git a/x-pack/plugins/observability_solution/infra/public/components/subscription_splash_content.tsx b/x-pack/plugins/observability_solution/infra/public/components/subscription_splash_content.tsx
index d1a78c3aeb927..386c5360f67a0 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/subscription_splash_content.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/subscription_splash_content.tsx
@@ -10,12 +10,10 @@ import { i18n } from '@kbn/i18n';
import { EuiText, EuiButton, EuiEmptyPrompt } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public';
-import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { useTrialStatus } from '../hooks/use_trial_status';
import { LoadingPrompt } from './loading_page';
import { PageTemplate } from './page_template';
import { useLicenseUrl } from '../hooks/use_license';
-import { useKibanaContextForPlugin } from '../hooks/use_kibana';
const loadingMessage = i18n.translate('xpack.infra.ml.splash.loadingMessage', {
defaultMessage: 'Checking license...',
@@ -114,7 +112,6 @@ export const SubscriptionSplashPage: React.FC {
const manageLicenseURL = useLicenseUrl();
- const { services } = useKibanaContextForPlugin();
return (
{
}
actions={[
-
-
- {i18n.translate('xpack.infra.ml.splash.startTrialCta', {
- defaultMessage: 'Start trial',
- })}
-
- ,
+
+ {i18n.translate('xpack.infra.ml.splash.startTrialCta', {
+ defaultMessage: 'Start trial',
+ })}
+ ,
]}
/>
);
diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/logs/logs_link_to_stream.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/logs/logs_link_to_stream.tsx
index d7fbd4dbf1be9..bb8cdfdaae1e2 100644
--- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/logs/logs_link_to_stream.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/logs/logs_link_to_stream.tsx
@@ -5,7 +5,6 @@
* 2.0.
*/
import React from 'react';
-import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { EuiButtonEmpty } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { getLogsLocatorsFromUrlService, LogViewReference } from '@kbn/logs-shared-plugin/common';
@@ -24,26 +23,24 @@ export const LogsLinkToStream = ({ startTime, endTime, query, logView }: LogsLin
const { logsLocator } = getLogsLocatorsFromUrlService(share.url);
return (
-
-
-
-
-
+
+
+
);
};