diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/test-arguments/calculated-field-test-arguments.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/test-arguments/calculated-field-test-arguments.component.ts index c1095343cb..ea73376c83 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/test-arguments/calculated-field-test-arguments.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/test-arguments/calculated-field-test-arguments.component.ts @@ -116,7 +116,7 @@ export class CalculatedFieldTestArgumentsComponent extends PageComponent impleme }).afterClosed() .pipe(filter(Boolean)) .subscribe(result => this.argumentsTypeMap.get(group.get('argumentName').value) === ArgumentType.Rolling - ? group.patchValue({ timewindow: (result as CalculatedFieldRollingTelemetryArgumentValue).timewindow, values: (result as CalculatedFieldRollingTelemetryArgumentValue).values }) + ? group.patchValue({ timeWindow: (result as CalculatedFieldRollingTelemetryArgumentValue).timeWindow, values: (result as CalculatedFieldRollingTelemetryArgumentValue).values }) : group.patchValue({ ts: (result as CalculatedFieldSingleArgumentValue).ts, value: (result as CalculatedFieldSingleArgumentValue).value }) ); } @@ -128,9 +128,9 @@ export class CalculatedFieldTestArgumentsComponent extends PageComponent impleme }) as FormGroup; } - private getRollingArgumentFormGroup({ argumentName, timewindow, values }: CalculatedFieldRollingTelemetryArgumentValue): FormGroup { + private getRollingArgumentFormGroup({ argumentName, timeWindow, values }: CalculatedFieldRollingTelemetryArgumentValue): FormGroup { return this.fb.group({ - ...timewindow ?? {}, + timeWindow: [timeWindow ?? {}], argumentName: [{ value: argumentName, disabled: true }], values: [values] }) as FormGroup; diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/test-dialog/calculated-field-script-test-dialog.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/test-dialog/calculated-field-script-test-dialog.component.ts index b644afa96d..769387b3dd 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/test-dialog/calculated-field-script-test-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/test-dialog/calculated-field-script-test-dialog.component.ts @@ -39,7 +39,8 @@ import { CalculatedFieldsService } from '@core/http/calculated-fields.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { filter } from 'rxjs/operators'; import { - ArgumentType, CalculatedFieldEventArguments, + ArgumentType, + CalculatedFieldEventArguments, CalculatedFieldTestScriptDialogData, TestArgumentTypeMap } from '@shared/models/calculated-field.models'; diff --git a/ui-ngx/src/app/shared/models/calculated-field.models.ts b/ui-ngx/src/app/shared/models/calculated-field.models.ts index 5229fbe851..8b05cee719 100644 --- a/ui-ngx/src/app/shared/models/calculated-field.models.ts +++ b/ui-ngx/src/app/shared/models/calculated-field.models.ts @@ -218,7 +218,7 @@ export interface CalculatedFieldLatestTelemetryArgumentValue extends CalculatedFieldArgumentValueBase { - timewindow: { startTs: number; endTs: number; limit: number }; + timeWindow: { startTs: number; endTs: number; limit: number }; values: CalculatedFieldSingleArgumentValue[]; }