Browse Source
Merge pull request #14612 from ArtemDzhereleiko/AD/enh/calculated-fields/prop-output
Enhancement for calculated fields
pull/14630/head
Vladyslav Prykhodko
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
15 additions and
0 deletions
-
ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts
-
ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.html
|
|
|
@ -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}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -55,6 +55,7 @@ |
|
|
|
[tenantId]="tenantId" |
|
|
|
[entityName]="entityName" |
|
|
|
[ownerId]="ownerId" |
|
|
|
[watchKeyChange]="true" |
|
|
|
[isScript]="this.propagateConfiguration.get('applyExpressionToResolvedArguments').value"/> |
|
|
|
</div> |
|
|
|
<div class="tb-form-panel no-gap" [class.!hidden]="!this.propagateConfiguration.get('applyExpressionToResolvedArguments').value"> |
|
|
|
|