mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashboards: render correct link for folder when searching for dashboards (#10763)
Fixes #10761
This commit is contained in:
committed by
Torkel Ödegaard
parent
20feb123c9
commit
a879dd8c0c
@@ -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,
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user