Skip to content

Commit

Permalink
#76920 Show base breadcrumb when there is an error booting the app (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Oct 6, 2020
1 parent 62a60f7 commit f627b14
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

export type StaticPage =
| 'base'
| 'overview'
| 'integrations'
| 'integrations_all'
Expand Down Expand Up @@ -62,6 +63,7 @@ export const pagePathGetters: {
{
[key in DynamicPage]: (values: DynamicPagePathValues) => string;
} = {
base: () => '/',
overview: () => '/',
integrations: () => '/integrations',
integrations_all: () => '/integrations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const BASE_BREADCRUMB: ChromeBreadcrumb = {
const breadcrumbGetters: {
[key in Page]: (values: DynamicPagePathValues) => ChromeBreadcrumb[];
} = {
base: () => [BASE_BREADCRUMB],
overview: () => [
BASE_BREADCRUMB,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import styled from 'styled-components';
import { EuiErrorBoundary, EuiPanel, EuiEmptyPrompt, EuiCode } from '@elastic/eui';
import { CoreStart, AppMountParameters } from 'src/core/public';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
import { EuiThemeProvider } from '../../../../xpack_legacy/common';
import {
IngestManagerSetupDeps,
Expand All @@ -33,10 +34,9 @@ import {
KibanaVersionContext,
} from './hooks';
import { PackageInstallProvider } from './sections/epm/hooks';
import { FleetStatusProvider } from './hooks/use_fleet_status';
import './index.scss';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
import { FleetStatusProvider, useBreadcrumbs } from './hooks';
import { IntraAppStateProvider } from './hooks/use_intra_app_state';
import './index.scss';

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

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

Expand Down

0 comments on commit f627b14

Please sign in to comment.