Browse Source

Timewindow: fixed applying interval parameters on closing configuration dialog

pull/12324/head
Ekaterina Chantsova 1 year ago
parent
commit
b7826592f4
  1. 8
      ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.html
  2. 3
      ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts

8
ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.html

@ -235,9 +235,10 @@
</mat-slide-toggle>
</div>
<div class="tb-form-row column-xs">
<ng-container
*ngTemplateOutlet="timewindowForm.get('aggregation.type').value !== aggregationTypes.NONE ? hideAggInterval : null">
</ng-container>
<ng-container formGroupName="realtime">
<ng-container *ngTemplateOutlet="hideAggInterval">
</ng-container>
<tb-timeinterval
formControlName="interval"
[min]="minRealtimeAggInterval" [max]="maxRealtimeAggInterval"
@ -257,7 +258,8 @@
</mat-slide-toggle>
</div>
<div class="tb-form-row column-xs">
<ng-container *ngTemplateOutlet="hideAggInterval">
<ng-container
*ngTemplateOutlet="timewindowForm.get('aggregation.type').value !== aggregationTypes.NONE ? hideAggInterval : null">
</ng-container>
<ng-container formGroupName="history">
<tb-timeinterval

3
ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts

@ -413,7 +413,8 @@ export class TimewindowPanelComponent extends PageComponent implements OnInit, O
}
private updateTimewindowForm() {
this.timewindowForm.patchValue(this.timewindow);
this.timewindowForm.patchValue(this.timewindow, {emitEvent: false});
this.updateValidators(this.timewindowForm.get('aggregation.type').value);
if (this.timewindow.realtime.hideInterval) {
this.timewindowForm.get('realtime.realtimeType').disable({emitEvent: false});

Loading…
Cancel
Save