Merge pull request #12117 from grafana/11525-dashlist-folder-picker

Fix search by folder in dashboard list panel
This commit is contained in:
Marcus Efraimsson 2018-06-04 18:08:38 +02:00 committed by GitHub
commit 38c94bb633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -23,10 +23,11 @@
</div> </div>
<div class="gf-form"> <div class="gf-form">
<folder-picker root-name="All" <folder-picker initial-folder-id="ctrl.panel.folderId"
initial-folder-id="ctrl.panel.folderId"
on-change="ctrl.onFolderChange($folder)" on-change="ctrl.onFolderChange($folder)"
label-class="width-6"> label-class="width-6"
initial-title="'All'"
enable-reset="true">
</folder-picker> </folder-picker>
</div> </div>

View File

@ -17,7 +17,7 @@ class DashListCtrl extends PanelCtrl {
search: false, search: false,
starred: true, starred: true,
headings: true, headings: true,
folderId: 0, folderId: null,
}; };
/** @ngInject */ /** @ngInject */
@ -85,7 +85,8 @@ class DashListCtrl extends PanelCtrl {
limit: this.panel.limit, limit: this.panel.limit,
query: this.panel.query, query: this.panel.query,
tag: this.panel.tags, tag: this.panel.tags,
folderId: this.panel.folderId, folderIds: this.panel.folderId,
type: 'dash-db',
}; };
return this.backendSrv.search(params).then(result => { return this.backendSrv.search(params).then(result => {