From 1778b8e8a87109dd5a95f3e527bdaad55b812de3 Mon Sep 17 00:00:00 2001 From: Marco Antonio Ghiani Date: Tue, 8 Oct 2024 16:47:51 +0200 Subject: [PATCH] refactor(infra): redirect to logs explorer once accessing /stream route --- .../infra/public/pages/logs/page_content.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/infra/public/pages/logs/page_content.tsx b/x-pack/plugins/observability_solution/infra/public/pages/logs/page_content.tsx index 05afffe0edb5..ecf5af5572b3 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/logs/page_content.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/logs/page_content.tsx @@ -15,6 +15,8 @@ import { SharePublicStart } from '@kbn/share-plugin/public/plugin'; import { ObservabilityOnboardingLocatorParams, OBSERVABILITY_ONBOARDING_LOCATOR, + AllDatasetsLocatorParams, + ALL_DATASETS_LOCATOR_ID, } from '@kbn/deeplinks-observability'; import { dynamic } from '@kbn/shared-ux-utility'; import { isDevMode } from '@kbn/xstate-utils'; @@ -92,7 +94,21 @@ export const LogsPageContent: React.FunctionComponent = () => { )} - {routes.stream && } + {routes.stream ? ( + + ) : ( + { + share.url.locators + .get(ALL_DATASETS_LOCATOR_ID) + ?.navigate({}); + + return null; + }} + /> + )} @@ -106,6 +122,7 @@ export const LogsPageContent: React.FunctionComponent = () => { to={routes.stream?.path ?? routes.logsAnomalies.path} exact /> + } />