From 121d48ec262eb5834ed94d1cec5cb23734eeb921 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Tue, 21 Nov 2017 17:06:30 +0100 Subject: [PATCH] dashlist: toggle folders --- public/app/features/dashboard/dashboard_list_ctrl.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/app/features/dashboard/dashboard_list_ctrl.ts b/public/app/features/dashboard/dashboard_list_ctrl.ts index 8f6820498b7..107d2576b09 100644 --- a/public/app/features/dashboard/dashboard_list_ctrl.ts +++ b/public/app/features/dashboard/dashboard_list_ctrl.ts @@ -34,6 +34,11 @@ export class DashboardListCtrl { } initDashboardList(result: any) { + if (!result) { + this.sections = []; + return; + } + this.sections = result; for (let section of this.sections) { @@ -128,6 +133,10 @@ export class DashboardListCtrl { }); } + toggleFolder(section) { + return this.searchSrv.toggleFolder(section); + } + // getTags() { // return this.backendSrv.get('/api/dashboards/tags').then((results) => { // this.tags = results;