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
This commit is contained in:
Ashley Harrison 2023-01-04 15:02:30 +00:00 committed by GitHub
parent 7005b7bf8a
commit ebb34560a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<AppChromeState>({
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;
}