|
@@ -209,6 +209,8 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
@@ -209,6 +209,8 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
209
|
|
209
|
|
210
|
thingsboardVersion: string = env.tbVersion;
|
210
|
thingsboardVersion: string = env.tbVersion;
|
211
|
|
211
|
|
|
|
212
|
+ translatedDashboardTitle: string;
|
|
|
213
|
+
|
212
|
currentDashboardId: string;
|
214
|
currentDashboardId: string;
|
213
|
currentCustomerId: string;
|
215
|
currentCustomerId: string;
|
214
|
currentDashboardScope: DashboardPageScope;
|
216
|
currentDashboardScope: DashboardPageScope;
|
|
@@ -303,7 +305,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
@@ -303,7 +305,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
303
|
private breakpointObserver: BreakpointObserver,
|
305
|
private breakpointObserver: BreakpointObserver,
|
304
|
private route: ActivatedRoute,
|
306
|
private route: ActivatedRoute,
|
305
|
private router: Router,
|
307
|
private router: Router,
|
306
|
- public utils: UtilsService,
|
308
|
+ private utils: UtilsService,
|
307
|
private dashboardUtils: DashboardUtilsService,
|
309
|
private dashboardUtils: DashboardUtilsService,
|
308
|
private authService: AuthService,
|
310
|
private authService: AuthService,
|
309
|
private entityService: EntityService,
|
311
|
private entityService: EntityService,
|
|
@@ -375,6 +377,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
@@ -375,6 +377,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
375
|
this.reset();
|
377
|
this.reset();
|
376
|
|
378
|
|
377
|
this.dashboard = data.dashboard;
|
379
|
this.dashboard = data.dashboard;
|
|
|
380
|
+ this.translatedDashboardTitle = this.getTranslatedDashboardTitle();
|
378
|
if (!this.embedded && this.dashboard.id) {
|
381
|
if (!this.embedded && this.dashboard.id) {
|
379
|
this.setStateDashboardId = true;
|
382
|
this.setStateDashboardId = true;
|
380
|
}
|
383
|
}
|
|
@@ -424,6 +427,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
@@ -424,6 +427,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
424
|
|
427
|
|
425
|
private reset() {
|
428
|
private reset() {
|
426
|
this.dashboard = null;
|
429
|
this.dashboard = null;
|
|
|
430
|
+ this.translatedDashboardTitle = null;
|
427
|
this.dashboardConfiguration = null;
|
431
|
this.dashboardConfiguration = null;
|
428
|
this.dashboardLogoCache = undefined;
|
432
|
this.dashboardLogoCache = undefined;
|
429
|
this.prevDashboard = null;
|
433
|
this.prevDashboard = null;
|
|
@@ -520,6 +524,10 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
@@ -520,6 +524,10 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
520
|
}
|
524
|
}
|
521
|
}
|
525
|
}
|
522
|
|
526
|
|
|
|
527
|
+ private getTranslatedDashboardTitle(): string {
|
|
|
528
|
+ return this.utils.customTranslation(this.dashboard.title, this.dashboard.title);
|
|
|
529
|
+ }
|
|
|
530
|
+
|
523
|
public displayExport(): boolean {
|
531
|
public displayExport(): boolean {
|
524
|
if (this.dashboard.configuration.settings &&
|
532
|
if (this.dashboard.configuration.settings &&
|
525
|
isDefined(this.dashboard.configuration.settings.showDashboardExport)) {
|
533
|
isDefined(this.dashboard.configuration.settings.showDashboardExport)) {
|
|
@@ -817,6 +825,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
@@ -817,6 +825,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
817
|
}
|
825
|
}
|
818
|
|
826
|
|
819
|
public saveDashboard() {
|
827
|
public saveDashboard() {
|
|
|
828
|
+ this.translatedDashboardTitle = this.getTranslatedDashboardTitle();
|
820
|
this.setEditMode(false, false);
|
829
|
this.setEditMode(false, false);
|
821
|
this.notifyDashboardUpdated();
|
830
|
this.notifyDashboardUpdated();
|
822
|
}
|
831
|
}
|