From ebb34560a4f68591a3d3c077f07beb44ffd3b631 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Wed, 4 Jan 2023 15:02:30 +0000 Subject: [PATCH] Navigation: use "Home" instead of "Grafana" as the default Breadcrumb text (#60973) * use Home instead of Grafana as the default Breadcrumb text * use translated text --- public/app/core/components/AppChrome/AppChromeService.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/app/core/components/AppChrome/AppChromeService.tsx b/public/app/core/components/AppChrome/AppChromeService.tsx index 54efe9e132b..e71b1113923 100644 --- a/public/app/core/components/AppChrome/AppChromeService.tsx +++ b/public/app/core/components/AppChrome/AppChromeService.tsx @@ -21,8 +21,6 @@ export interface AppChromeState { kioskMode: KioskMode | null; } -const defaultSection: NavModelItem = { text: 'Grafana' }; - export class AppChromeService { searchBarStorageKey = 'SearchBar_Hidden'; private currentRoute?: RouteDescriptor; @@ -30,7 +28,7 @@ export class AppChromeService { readonly state = new BehaviorSubject({ chromeless: true, // start out hidden to not flash it on pages without chrome - sectionNav: defaultSection, + sectionNav: { text: t('nav.home.title', 'Home') }, searchBarHidden: store.getBool(this.searchBarStorageKey, false), kioskMode: null, }); @@ -52,7 +50,7 @@ export class AppChromeService { if (!this.routeChangeHandled) { newState.actions = undefined; newState.pageNav = undefined; - newState.sectionNav = defaultSection; + newState.sectionNav = { text: t('nav.home.title', 'Home') }; newState.chromeless = this.currentRoute?.chromeless; this.routeChangeHandled = true; }