diff --git a/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.html b/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.html index 9d786e14c1..383bf7f7b0 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.html +++ b/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.html @@ -63,7 +63,7 @@ subscriptSizing="dynamic" appearance="outline" [disabledAdvanced]="timewindowForm.get('realtime.disableCustomInterval').value" - [required]="timewindow.selectedTab === timewindowTypes.REALTIME && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.REALTIME && timewindowForm.get('realtime.realtimeType').value === realtimeTypes.LAST_INTERVAL"> @@ -83,7 +83,7 @@ onlyCurrentInterval="true" subscriptSizing="dynamic" appearance="outline" - [required]="timewindow.selectedTab === timewindowTypes.REALTIME && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.REALTIME && timewindowForm.get('realtime.realtimeType').value === realtimeTypes.INTERVAL"> @@ -118,7 +118,7 @@ subscriptSizing="dynamic" appearance="outline" [disabledAdvanced]="timewindowForm.get('history.disableCustomInterval').value" - [required]="timewindow.selectedTab === timewindowTypes.HISTORY && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.HISTORY && timewindowForm.get('history.historyType').value === historyTypes.LAST_INTERVAL"> @@ -135,7 +135,7 @@ subscriptSizing="dynamic" appearance="outline" class="history-time-input" - [required]="timewindow.selectedTab === timewindowTypes.HISTORY && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.HISTORY && timewindowForm.get('history.historyType').value === historyTypes.FIXED"> @@ -151,7 +151,7 @@ formControlName="quickInterval" subscriptSizing="dynamic" appearance="outline" - [required]="timewindow.selectedTab === timewindowTypes.HISTORY && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.HISTORY && timewindowForm.get('history.historyType').value === historyTypes.INTERVAL"> @@ -198,7 +198,7 @@
{{ 'aggregation.group-interval' | translate }}
- +
{{ 'timewindow.disable-custom-interval' | translate }} @@ -219,7 +219,7 @@
- +
{{ 'timewindow.disable-custom-interval' | translate }} diff --git a/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts b/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts index 77297dbe05..41ab6a0787 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts +++ b/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts @@ -56,8 +56,6 @@ export class TimewindowConfigDialogComponent extends PageComponent implements On aggregation = false; - timewindow: Timewindow; - timewindowForm: FormGroup; historyTypes = HistoryWindowType; @@ -109,6 +107,8 @@ export class TimewindowConfigDialogComponent extends PageComponent implements On realtimeTypeSelectionAvailable: boolean; + private timewindow: Timewindow; + private destroy$ = new Subject(); constructor(@Inject(MAT_DIALOG_DATA) public data: TimewindowConfigDialogData, diff --git a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html index 45bd25d30e..a3409e0ef3 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html +++ b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html @@ -51,7 +51,7 @@ subscriptSizing="dynamic" appearance="outline" [disabledAdvanced]="timewindow.realtime.disableCustomInterval" - [required]="timewindow.selectedTab === timewindowTypes.REALTIME && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.REALTIME && timewindowForm.get('realtime.realtimeType').value === realtimeTypes.LAST_INTERVAL"> @@ -62,7 +62,7 @@ onlyCurrentInterval="true" subscriptSizing="dynamic" appearance="outline" - [required]="timewindow.selectedTab === timewindowTypes.REALTIME && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.REALTIME && timewindowForm.get('realtime.realtimeType').value === realtimeTypes.INTERVAL">
@@ -94,7 +94,7 @@ subscriptSizing="dynamic" appearance="outline" [disabledAdvanced]="timewindow.history.disableCustomInterval" - [required]="timewindow.selectedTab === timewindowTypes.HISTORY && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.HISTORY && timewindowForm.get('history.historyType').value === historyTypes.LAST_INTERVAL"> @@ -104,7 +104,7 @@ subscriptSizing="dynamic" appearance="outline" class="history-time-input" - [required]="timewindow.selectedTab === timewindowTypes.HISTORY && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.HISTORY && timewindowForm.get('history.historyType').value === historyTypes.FIXED"> @@ -114,7 +114,7 @@ formControlName="quickInterval" subscriptSizing="dynamic" appearance="outline" - [required]="timewindow.selectedTab === timewindowTypes.HISTORY && + [required]="timewindowForm.get('selectedTab').value === timewindowTypes.HISTORY && timewindowForm.get('history.historyType').value === historyTypes.INTERVAL"> @@ -145,7 +145,7 @@
- + {{ 'aggregation.group-interval' | translate }} - +