From 54f3e873a4e8afd1b1c83f4d25fa674abb8970f6 Mon Sep 17 00:00:00 2001 From: Elykov Alexandr Date: Tue, 6 Aug 2019 19:22:45 +0300 Subject: [PATCH] Frontend: adds folder name in home dash choose menu (#18346) * Frontend:adds folder name in choose home dash menu(#18293) * Frontend:adds folder name in choose home dash menu(#18293) --- .../components/SharedPreferences/SharedPreferences.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/app/core/components/SharedPreferences/SharedPreferences.tsx b/public/app/core/components/SharedPreferences/SharedPreferences.tsx index 82450a2320e..adaa75a640b 100644 --- a/public/app/core/components/SharedPreferences/SharedPreferences.tsx +++ b/public/app/core/components/SharedPreferences/SharedPreferences.tsx @@ -97,6 +97,13 @@ export class SharedPreferences extends PureComponent { this.setState({ homeDashboardId: dashboardId }); }; + getFullDashName = (dashboard: DashboardSearchHit) => { + if (typeof dashboard.folderTitle === 'undefined' || dashboard.folderTitle === '') { + return dashboard.title; + } + return dashboard.folderTitle + ' / ' + dashboard.title; + }; + render() { const { theme, timezone, homeDashboardId, dashboards } = this.state; @@ -123,7 +130,7 @@ export class SharedPreferences extends PureComponent {