Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] #76920 Show base breadcrumb when there is an error booting the app (#79571) #79605

Merged
merged 1 commit into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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