dashboard and folder search with permissions

This commit is contained in:
Torkel Ödegaard
2018-02-08 17:11:01 +01:00
parent b84fd3a7ae
commit 8e8f3c4332
12 changed files with 43 additions and 98 deletions

View File

@@ -30,7 +30,13 @@ export class FolderPickerCtrl {
}
getOptions(query) {
return this.backendSrv.get('api/dashboards/folders', { query: query }).then(result => {
const params = {
query: query,
type: 'dash-folder',
permission: 'Edit',
};
return this.backendSrv.get('api/search', params).then(result => {
if (
query === '' ||
query.toLowerCase() === 'g' ||