diff --git a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts
index 3044f29bca..4caf5f3edd 100644
--- a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts
@@ -468,10 +468,13 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI
);
}
- private detectChanges() {
+ private detectChanges(detectDashboardChanges = false) {
if (!this.destroyed) {
try {
this.cd.detectChanges();
+ if (detectDashboardChanges) {
+ this.widgetContext.dashboard.detectChanges();
+ }
} catch (e) {
// console.log(e);
}
@@ -491,6 +494,7 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI
}
if (!this.widgetContext.inited && this.isReady()) {
this.widgetContext.inited = true;
+ this.widgetContext.dashboard.detectChanges();
if (this.cafs.init) {
this.cafs.init();
this.cafs.init = null;
@@ -878,7 +882,7 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI
timeWindowUpdated: (subscription, timeWindowConfig) => {
this.ngZone.run(() => {
this.widget.config.timewindow = timeWindowConfig;
- this.detectChanges();
+ this.detectChanges(true);
});
}
};
diff --git a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts
index b1ded98ba7..88d09ac855 100644
--- a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts
+++ b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts
@@ -79,6 +79,7 @@ export interface IDashboardComponent {
pauseChangeNotifications();
resumeChangeNotifications();
notifyLayoutUpdated();
+ detectChanges();
}
declare type DashboardWidgetUpdateOperation = 'add' | 'remove' | 'update';
@@ -342,7 +343,7 @@ export class DashboardWidget implements GridsterItem, IDashboardWidget {
widget.id = guid();
}
this.widgetId = widget.id;
- this.updateWidgetParams();
+ this.updateWidgetParams(false);
}
gridsterItemComponent$(): Observable {
@@ -353,7 +354,7 @@ export class DashboardWidget implements GridsterItem, IDashboardWidget {
}
}
- updateWidgetParams() {
+ updateWidgetParams(detectChanges = true) {
this.color = this.widget.config.color || 'rgba(0, 0, 0, 0.87)';
this.backgroundColor = this.widget.config.backgroundColor || '#fff';
this.padding = this.widget.config.padding || '8px';
@@ -405,6 +406,9 @@ export class DashboardWidget implements GridsterItem, IDashboardWidget {
this.customHeaderActions = this.widgetContext.customHeaderActions ? this.widgetContext.customHeaderActions : [];
this.widgetActions = this.widgetContext.widgetActions ? this.widgetContext.widgetActions : [];
+ if (detectChanges) {
+ this.dashboard.detectChanges();
+ }
}
@enumerable(true)
diff --git a/ui-ngx/src/app/shared/components/time/timewindow.component.ts b/ui-ngx/src/app/shared/components/time/timewindow.component.ts
index 0169feaae7..77d10eadcc 100644
--- a/ui-ngx/src/app/shared/components/time/timewindow.component.ts
+++ b/ui-ngx/src/app/shared/components/time/timewindow.component.ts
@@ -15,6 +15,7 @@
///
import {
+ ChangeDetectorRef,
Component,
forwardRef,
Inject,
@@ -158,6 +159,7 @@ export class TimewindowComponent implements OnInit, OnDestroy, ControlValueAcces
private millisecondsToTimeStringPipe: MillisecondsToTimeStringPipe,
private datePipe: DatePipe,
private overlay: Overlay,
+ private cd: ChangeDetectorRef,
public viewContainerRef: ViewContainerRef,
public breakpointObserver: BreakpointObserver,
@Inject(DOCUMENT) private document: Document,
@@ -313,6 +315,7 @@ export class TimewindowComponent implements OnInit, OnDestroy, ControlValueAcces
} else {
this.innerValue.displayTimezoneAbbr = '';
}
+ this.cd.detectChanges();
}
hideLabel() {
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index 1eb540a2e3..3da7b4f4bb 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -1234,7 +1234,6 @@
"required": " value is required.",
"mode": "Security config mode",
"pattern_hex_dec": "{ count, plural, 0 {must be hex decimal format} other {must be # characters} }",
- "bootstrap-tab": "Bootstrap",
"servers": "Servers",
"short-id": "Short ID",
"short-id-tip": "Short Server ID",