Skip to content

Commit c19d1f4

Browse files
authored
#76920 Show base breadcrumb when there is an error booting the app (#79571)
1 parent 025af1a commit c19d1f4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

x-pack/plugins/ingest_manager/public/applications/ingest_manager/constants/page_paths.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
export type StaticPage =
8+
| 'base'
89
| 'overview'
910
| 'integrations'
1011
| 'integrations_all'
@@ -62,6 +63,7 @@ export const pagePathGetters: {
6263
{
6364
[key in DynamicPage]: (values: DynamicPagePathValues) => string;
6465
} = {
66+
base: () => '/',
6567
overview: () => '/',
6668
integrations: () => '/integrations',
6769
integrations_all: () => '/integrations',

x-pack/plugins/ingest_manager/public/applications/ingest_manager/hooks/use_breadcrumbs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const BASE_BREADCRUMB: ChromeBreadcrumb = {
1818
const breadcrumbGetters: {
1919
[key in Page]: (values: DynamicPagePathValues) => ChromeBreadcrumb[];
2020
} = {
21+
base: () => [BASE_BREADCRUMB],
2122
overview: () => [
2223
BASE_BREADCRUMB,
2324
{

x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
1212
import styled from 'styled-components';
1313
import { EuiErrorBoundary, EuiPanel, EuiEmptyPrompt, EuiCode } from '@elastic/eui';
1414
import { CoreStart, AppMountParameters } from 'src/core/public';
15+
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
1516
import { EuiThemeProvider } from '../../../../xpack_legacy/common';
1617
import {
1718
IngestManagerSetupDeps,
@@ -33,10 +34,9 @@ import {
3334
KibanaVersionContext,
3435
} from './hooks';
3536
import { PackageInstallProvider } from './sections/epm/hooks';
36-
import { FleetStatusProvider } from './hooks/use_fleet_status';
37-
import './index.scss';
38-
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
37+
import { FleetStatusProvider, useBreadcrumbs } from './hooks';
3938
import { IntraAppStateProvider } from './hooks/use_intra_app_state';
39+
import './index.scss';
4040

4141
export interface ProtectedRouteProps extends RouteProps {
4242
isAllowed?: boolean;
@@ -67,6 +67,7 @@ const ErrorLayout = ({ children }: { children: JSX.Element }) => (
6767

6868
const IngestManagerRoutes = memo<{ history: AppMountParameters['history']; basepath: string }>(
6969
({ history, ...rest }) => {
70+
useBreadcrumbs('base');
7071
const { fleet } = useConfig();
7172
const { notifications } = useCore();
7273

0 commit comments

Comments
 (0)