|
|
|
@ -209,6 +209,8 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
|
|
|
|
|
|
thingsboardVersion: string = env.tbVersion; |
|
|
|
|
|
|
|
translatedDashboardTitle: string; |
|
|
|
|
|
|
|
currentDashboardId: string; |
|
|
|
currentCustomerId: string; |
|
|
|
currentDashboardScope: DashboardPageScope; |
|
|
|
@ -303,7 +305,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
|
|
private breakpointObserver: BreakpointObserver, |
|
|
|
private route: ActivatedRoute, |
|
|
|
private router: Router, |
|
|
|
public utils: UtilsService, |
|
|
|
private utils: UtilsService, |
|
|
|
private dashboardUtils: DashboardUtilsService, |
|
|
|
private authService: AuthService, |
|
|
|
private entityService: EntityService, |
|
|
|
@ -375,6 +377,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
|
|
this.reset(); |
|
|
|
|
|
|
|
this.dashboard = data.dashboard; |
|
|
|
this.translatedDashboardTitle = this.getTranslatedDashboardTitle(); |
|
|
|
if (!this.embedded && this.dashboard.id) { |
|
|
|
this.setStateDashboardId = true; |
|
|
|
} |
|
|
|
@ -424,6 +427,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
|
|
|
|
|
|
private reset() { |
|
|
|
this.dashboard = null; |
|
|
|
this.translatedDashboardTitle = null; |
|
|
|
this.dashboardConfiguration = null; |
|
|
|
this.dashboardLogoCache = undefined; |
|
|
|
this.prevDashboard = null; |
|
|
|
@ -520,6 +524,10 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private getTranslatedDashboardTitle(): string { |
|
|
|
return this.utils.customTranslation(this.dashboard.title, this.dashboard.title); |
|
|
|
} |
|
|
|
|
|
|
|
public displayExport(): boolean { |
|
|
|
if (this.dashboard.configuration.settings && |
|
|
|
isDefined(this.dashboard.configuration.settings.showDashboardExport)) { |
|
|
|
@ -817,6 +825,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
|
|
} |
|
|
|
|
|
|
|
public saveDashboard() { |
|
|
|
this.translatedDashboardTitle = this.getTranslatedDashboardTitle(); |
|
|
|
this.setEditMode(false, false); |
|
|
|
this.notifyDashboardUpdated(); |
|
|
|
} |
|
|
|
|