|
@@ -97,6 +97,13 @@ export class SharedPreferences extends PureComponent<Props, State> {
|
|
|
this.setState({ homeDashboardId: dashboardId });
|
|
this.setState({ homeDashboardId: dashboardId });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ getFullDashName = (dashboard: DashboardSearchHit) => {
|
|
|
|
|
+ if (typeof dashboard.folderTitle === 'undefined' || dashboard.folderTitle === '') {
|
|
|
|
|
+ return dashboard.title;
|
|
|
|
|
+ }
|
|
|
|
|
+ return dashboard.folderTitle + ' / ' + dashboard.title;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
render() {
|
|
render() {
|
|
|
const { theme, timezone, homeDashboardId, dashboards } = this.state;
|
|
const { theme, timezone, homeDashboardId, dashboards } = this.state;
|
|
|
|
|
|
|
@@ -123,7 +130,7 @@ export class SharedPreferences extends PureComponent<Props, State> {
|
|
|
<Select
|
|
<Select
|
|
|
value={dashboards.find(dashboard => dashboard.id === homeDashboardId)}
|
|
value={dashboards.find(dashboard => dashboard.id === homeDashboardId)}
|
|
|
getOptionValue={i => i.id}
|
|
getOptionValue={i => i.id}
|
|
|
- getOptionLabel={i => i.title}
|
|
|
|
|
|
|
+ getOptionLabel={this.getFullDashName}
|
|
|
onChange={(dashboard: DashboardSearchHit) => this.onHomeDashboardChanged(dashboard.id)}
|
|
onChange={(dashboard: DashboardSearchHit) => this.onHomeDashboardChanged(dashboard.id)}
|
|
|
options={dashboards}
|
|
options={dashboards}
|
|
|
placeholder="Choose default dashboard"
|
|
placeholder="Choose default dashboard"
|