Commit 38c94bb6 by Marcus Efraimsson Committed by GitHub

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

Fix search by folder in dashboard list panel
parents 9e59751c d650dc94
...@@ -23,10 +23,11 @@ ...@@ -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>
......
...@@ -17,7 +17,7 @@ class DashListCtrl extends PanelCtrl { ...@@ -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 { ...@@ -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 => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment