mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashfolders: Add support for breadcrumbs in NavStore #10275
This commit is contained in:
parent
3a94918b8f
commit
766ab69143
@ -1,5 +1,10 @@
|
|||||||
import { types } from 'mobx-state-tree';
|
import { types } from 'mobx-state-tree';
|
||||||
|
|
||||||
|
const BreadcrumbItem = types.model('BreadcrumbItem', {
|
||||||
|
title: types.string,
|
||||||
|
url: types.string,
|
||||||
|
});
|
||||||
|
|
||||||
export const NavItem = types.model('NavItem', {
|
export const NavItem = types.model('NavItem', {
|
||||||
id: types.identifier(types.string),
|
id: types.identifier(types.string),
|
||||||
text: types.string,
|
text: types.string,
|
||||||
@ -10,6 +15,7 @@ export const NavItem = types.model('NavItem', {
|
|||||||
active: types.optional(types.boolean, false),
|
active: types.optional(types.boolean, false),
|
||||||
breadcrumbs: types.optional(types.array(types.late(() => Breadcrumb)), []),
|
breadcrumbs: types.optional(types.array(types.late(() => Breadcrumb)), []),
|
||||||
children: types.optional(types.array(types.late(() => NavItem)), []),
|
children: types.optional(types.array(types.late(() => NavItem)), []),
|
||||||
|
breadcrumbs: types.optional(types.array(BreadcrumbItem), []),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const Breadcrumb = types.model('Breadcrumb', {
|
export const Breadcrumb = types.model('Breadcrumb', {
|
||||||
|
Loading…
Reference in New Issue
Block a user