Merge pull request #12324 from ChantsovaEkaterina/bug/fixed-applying-timewindow-config

Timewindow: fixed applying grouping interval on closing configuration dialog
This commit is contained in:
Igor Kulikov 2024-12-24 13:54:18 +02:00 committed by GitHub
commit 73977b0969
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

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

View File

@ -413,7 +413,8 @@ export class TimewindowPanelComponent extends PageComponent implements OnInit, O
} }
private updateTimewindowForm() { 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) { if (this.timewindow.realtime.hideInterval) {
this.timewindowForm.get('realtime.realtimeType').disable({emitEvent: false}); this.timewindowForm.get('realtime.realtimeType').disable({emitEvent: false});