diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/applications/observability_logs_explorer.tsx b/x-pack/plugins/observability_solution/observability_logs_explorer/public/applications/observability_logs_explorer.tsx index cab3742c06f05..3154c7c09cc8e 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/applications/observability_logs_explorer.tsx +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/applications/observability_logs_explorer.tsx @@ -12,6 +12,7 @@ import { Route, Router, Routes } from '@kbn/shared-ux-router'; import React from 'react'; import ReactDOM from 'react-dom'; import { DatasetQualityRoute, ObservabilityLogsExplorerMainRoute } from '../routes/main'; +import { NotFoundPage } from '../routes/not_found'; import { ObservabilityLogsExplorerAppMountParameters, ObservabilityLogsExplorerPluginStart, @@ -83,6 +84,7 @@ export const ObservabilityLogsExplorerApp = ({ exact={true} render={() => } /> + } /> diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/page_template.tsx b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/page_template.tsx index 288770032e3a1..87182c0cc4e06 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/page_template.tsx +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/page_template.tsx @@ -7,25 +7,23 @@ import { EuiPageSectionProps } from '@elastic/eui'; import { css } from '@emotion/react'; +import { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; import React from 'react'; import { useKibanaContextForPlugin } from '../utils/use_kibana'; export const ObservabilityLogsExplorerPageTemplate = ({ - children, - pageProps, -}: React.PropsWithChildren<{ - pageProps?: EuiPageSectionProps; -}>) => { + pageSectionProps, + ...props +}: LazyObservabilityPageTemplateProps) => { const { services: { observabilityShared }, } = useKibanaContextForPlugin(); return ( - {children} - + pageSectionProps={{ ...defaultPageSectionProps, ...pageSectionProps }} + {...props} + /> ); }; @@ -37,7 +35,7 @@ const fullHeightContentStyles = css` height: 100%; `; -const pageSectionProps: EuiPageSectionProps = { +const defaultPageSectionProps: EuiPageSectionProps = { grow: true, paddingSize: 'none', contentProps: { css: fullHeightContentStyles }, diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/routes/main/dataset_quality_route.tsx b/x-pack/plugins/observability_solution/observability_logs_explorer/public/routes/main/dataset_quality_route.tsx index d0c621377a8a7..325da7a1ceb08 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/routes/main/dataset_quality_route.tsx +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/routes/main/dataset_quality_route.tsx @@ -100,7 +100,7 @@ const InitializedContent = React.memo( datasetQualityController: DatasetQualityController; }) => { return ( - + ); diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/routes/not_found.tsx b/x-pack/plugins/observability_solution/observability_logs_explorer/public/routes/not_found.tsx new file mode 100644 index 0000000000000..487094d4504cc --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/routes/not_found.tsx @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { NotFoundPrompt } from '@kbn/shared-ux-prompt-not-found'; +import { ObservabilityLogsExplorerPageTemplate } from '../components/page_template'; + +export const NotFoundPage = () => { + return ( + + + + ); +}; diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json b/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json index c434a418c4246..471ae17fd4029 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json @@ -45,6 +45,7 @@ "@kbn/data-views-plugin", "@kbn/data-view-editor-plugin", "@kbn/lens-plugin", + "@kbn/shared-ux-prompt-not-found", ], "exclude": [ "target/**/*"