diff --git a/public/app/stores/NavStore/NavItem.ts b/public/app/stores/NavStore/NavItem.ts index cbd0f269f01..4521d4291aa 100644 --- a/public/app/stores/NavStore/NavItem.ts +++ b/public/app/stores/NavStore/NavItem.ts @@ -8,5 +8,11 @@ export const NavItem = types.model('NavItem', { icon: types.optional(types.string, ''), img: types.optional(types.string, ''), active: types.optional(types.boolean, false), + breadcrumbs: types.optional(types.array(types.late(() => Breadcrumb)), []), children: types.optional(types.array(types.late(() => NavItem)), []), }); + +export const Breadcrumb = types.model('Breadcrumb', { + title: types.string, + url: types.string, +}); diff --git a/public/app/stores/NavStore/NavStore.ts b/public/app/stores/NavStore/NavStore.ts index e6491e72372..3874316e231 100644 --- a/public/app/stores/NavStore/NavStore.ts +++ b/public/app/stores/NavStore/NavStore.ts @@ -41,7 +41,7 @@ export const NavStore = types initFolderNav(folder: any, activeChildId: string) { const folderUrl = createFolderUrl(folder.id, folder.slug); - self.main = { + let main = { icon: 'fa fa-folder-open', id: 'manage-folder', subTitle: 'Manage folder dashboards & permissions', @@ -72,6 +72,8 @@ export const NavStore = types }, ], }; + + self.main = NavItem.create(main); }, }));