moving things around

This commit is contained in:
Torkel Ödegaard
2018-09-02 07:11:21 -07:00
parent de456f8b73
commit 2ac202b22f
23 changed files with 53 additions and 34 deletions

View File

@@ -1,3 +1,5 @@
import { NavModel, NavModelItem } from 'app/types';
export const backendSrv = {
get: jest.fn(),
getDashboard: jest.fn(),
@@ -17,3 +19,30 @@ export function createNavTree(...args) {
return root;
}
export function getNavModel(title: string, tabs: string[]): NavModel {
const node: NavModelItem = {
id: title,
text: title,
icon: 'fa fa-fw fa-warning',
subTitle: 'subTitle',
url: title,
children: [],
breadcrumbs: [],
};
for (let tab of tabs) {
node.children.push({
id: tab,
icon: 'icon',
subTitle: 'subTitle',
url: title,
text: title,
});
}
return {
node: node,
main: node,
};
}