diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts index 239a4921e4..279f4ee0b6 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts @@ -120,6 +120,10 @@ export class CalculatedFieldOutputComponent implements ControlValueAccessor, Val this.updatedStrategy(); }); + this.outputForm.get('strategy.saveTimeSeries').valueChanges + .pipe(takeUntilDestroyed(this.destroyRef)) + .subscribe(value => this.updateTimeSeriesTtl(value)); + merge( this.outputForm.get('strategy.type').valueChanges, this.outputForm.get('strategy.useCustomTtl').valueChanges @@ -178,6 +182,7 @@ export class CalculatedFieldOutputComponent implements ControlValueAccessor, Val this.updatedFormWithMode(); this.toggleScopeByOutputType(this.outputForm.get('type').value); this.updatedStrategy(); + this.updateTimeSeriesTtl(this.outputForm.get('strategy.saveTimeSeries').value); } } @@ -242,4 +247,13 @@ export class CalculatedFieldOutputComponent implements ControlValueAccessor, Val } } } + + private updateTimeSeriesTtl(value: boolean) { + if (value) { + this.outputForm.get('strategy.useCustomTtl').enable({emitEvent: true}); + } else { + this.outputForm.get('strategy.useCustomTtl').disable({emitEvent: false}); + this.outputForm.get('strategy.ttl').disable({emitEvent: false}); + } + } } diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.html b/ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.html index bd92d25f92..c1acbd0b95 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.html @@ -55,6 +55,7 @@ [tenantId]="tenantId" [entityName]="entityName" [ownerId]="ownerId" + [watchKeyChange]="true" [isScript]="this.propagateConfiguration.get('applyExpressionToResolvedArguments').value"/>