dashboards: render correct link for folder when searching for dashboards (#10763)

Fixes #10761
This commit is contained in:
Marcus Efraimsson
2018-02-05 13:23:24 +01:00
committed by Torkel Ödegaard
parent 20feb123c9
commit a879dd8c0c
7 changed files with 26 additions and 12 deletions
@@ -20,9 +20,6 @@ describe('ManageDashboards', () => {
icon: 'fa fa-folder',
tags: [],
isStarred: false,
folderId: 410,
folderTitle: 'afolder',
folderSlug: 'afolder',
},
],
tags: [],
@@ -77,9 +74,6 @@ describe('ManageDashboards', () => {
icon: 'fa fa-folder',
tags: [],
isStarred: false,
folderId: 410,
folderTitle: 'afolder',
folderSlug: 'afolder',
},
],
tags: [],
@@ -112,8 +106,9 @@ describe('ManageDashboards', () => {
tags: [],
isStarred: false,
folderId: 410,
folderTitle: 'afolder',
folderSlug: 'afolder',
folderUid: 'uid',
folderTitle: 'Folder',
folderUrl: '/dashboards/f/uid/folder',
},
{
id: 500,
+7
View File
@@ -190,7 +190,9 @@ describe('SearchSrv', () => {
title: 'dash in folder1 1',
type: 'dash-db',
folderId: 1,
folderUid: 'uid',
folderTitle: 'folder1',
folderUrl: '/dashboards/f/uid/folder1',
},
])
);
@@ -206,6 +208,11 @@ describe('SearchSrv', () => {
it('should group results by folder', () => {
expect(results).toHaveLength(2);
expect(results[0].id).toEqual(0);
expect(results[1].id).toEqual(1);
expect(results[1].uid).toEqual('uid');
expect(results[1].title).toEqual('folder1');
expect(results[1].url).toEqual('/dashboards/f/uid/folder1');
});
});