diff --git a/public/components/trace_analytics/components/services/service_view.tsx b/public/components/trace_analytics/components/services/service_view.tsx index 3128a2e1b..a6e1f8c85 100644 --- a/public/components/trace_analytics/components/services/service_view.tsx +++ b/public/components/trace_analytics/components/services/service_view.tsx @@ -104,12 +104,14 @@ export function ServiceView(props: ServiceViewProps) { useEffect(() => { if (page !== 'serviceFlyout') setNavBreadCrumbs( - [props.parentBreadcrumb], [ + props.parentBreadcrumb, { text: 'Trace analytics', - href: '#/', + href: '#/services', }, + ], + [ { text: 'Services', href: '#/services', diff --git a/public/components/trace_analytics/components/traces/trace_view.tsx b/public/components/trace_analytics/components/traces/trace_view.tsx index 05b5bbbcc..d71f3c92e 100644 --- a/public/components/trace_analytics/components/traces/trace_view.tsx +++ b/public/components/trace_analytics/components/traces/trace_view.tsx @@ -233,12 +233,14 @@ export function TraceView(props: TraceViewProps) { useEffect(() => { setNavBreadCrumbs( - [props.parentBreadcrumb], [ + props.parentBreadcrumb, { text: 'Trace analytics', - href: '#/', + href: '#/services', }, + ], + [ { text: 'Traces', href: '#/traces', diff --git a/public/components/trace_analytics/home.tsx b/public/components/trace_analytics/home.tsx index da691d9cf..2843c945c 100644 --- a/public/components/trace_analytics/home.tsx +++ b/public/components/trace_analytics/home.tsx @@ -123,7 +123,7 @@ export const Home = (props: HomeProps) => { let defaultRoute = props.defaultRoute ?? '/services'; const currentHash = window.location.hash.split('#')[1] || ''; - if (currentHash === '/traces' || currentHash === '/services') { + if (currentHash.startsWith('/traces') || currentHash.startsWith('/services')) { defaultRoute = currentHash; } @@ -196,10 +196,14 @@ export const Home = (props: HomeProps) => { }, [mode]); const serviceBreadcrumbs = [ - { - text: 'Trace analytics', - href: '#/services', - }, + ...(!isNavGroupEnabled + ? [ + { + text: 'Trace analytics', + href: '#/services', + }, + ] + : []), { text: 'Services', href: '#/services', @@ -207,10 +211,14 @@ export const Home = (props: HomeProps) => { ]; const traceBreadcrumbs = [ - { - text: 'Trace analytics', - href: '#/services', - }, + ...(!isNavGroupEnabled + ? [ + { + text: 'Trace analytics', + href: '#/services', + }, + ] + : []), { text: 'Traces', href: '#/traces',