mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashfolders: add breadcrumbs to NavStore
This commit is contained in:
parent
a5830c6dbc
commit
10018d8455
@ -8,5 +8,11 @@ export const NavItem = types.model('NavItem', {
|
|||||||
icon: types.optional(types.string, ''),
|
icon: types.optional(types.string, ''),
|
||||||
img: types.optional(types.string, ''),
|
img: types.optional(types.string, ''),
|
||||||
active: types.optional(types.boolean, false),
|
active: types.optional(types.boolean, false),
|
||||||
|
breadcrumbs: types.optional(types.array(types.late(() => Breadcrumb)), []),
|
||||||
children: types.optional(types.array(types.late(() => NavItem)), []),
|
children: types.optional(types.array(types.late(() => NavItem)), []),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const Breadcrumb = types.model('Breadcrumb', {
|
||||||
|
title: types.string,
|
||||||
|
url: types.string,
|
||||||
|
});
|
||||||
|
@ -41,7 +41,7 @@ export const NavStore = types
|
|||||||
initFolderNav(folder: any, activeChildId: string) {
|
initFolderNav(folder: any, activeChildId: string) {
|
||||||
const folderUrl = createFolderUrl(folder.id, folder.slug);
|
const folderUrl = createFolderUrl(folder.id, folder.slug);
|
||||||
|
|
||||||
self.main = {
|
let main = {
|
||||||
icon: 'fa fa-folder-open',
|
icon: 'fa fa-folder-open',
|
||||||
id: 'manage-folder',
|
id: 'manage-folder',
|
||||||
subTitle: 'Manage folder dashboards & permissions',
|
subTitle: 'Manage folder dashboards & permissions',
|
||||||
@ -72,6 +72,8 @@ export const NavStore = types
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.main = NavItem.create(main);
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user