From bc6ad92ce00121ae9b3b35b7995b4e591ecad876 Mon Sep 17 00:00:00 2001 From: mpetrov Date: Fri, 13 Sep 2024 18:01:32 +0300 Subject: [PATCH] Gateway ui improvements and minor bug fixes --- ...ateway-advanced-configuration.component.ts | 5 +- ...gateway-basic-configuration.component.html | 3 +- .../gateway-configuration.component.ts | 16 ++++--- .../models/gateway-configuration.models.ts | 48 ++++++++++--------- .../mapping-table/mapping-table.component.ts | 3 +- .../opc-server-config.component.html | 4 +- .../gateway/gateway-connectors.component.ts | 3 +- .../lib/gateway/gateway-widget.models.ts | 1 + .../assets/locale/locale.constant-en_US.json | 2 + 9 files changed, 50 insertions(+), 35 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/configuration/advanced/gateway-advanced-configuration.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/configuration/advanced/gateway-advanced-configuration.component.ts index c806130975..16a0274049 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/configuration/advanced/gateway-advanced-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/configuration/advanced/gateway-advanced-configuration.component.ts @@ -28,6 +28,7 @@ import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { SharedModule } from '@shared/shared.module'; import { CommonModule } from '@angular/common'; +import { GatewayConfigValue } from '@home/components/widget/lib/gateway/configuration/models/gateway-configuration.models'; @Component({ selector: 'tb-gateway-advanced-configuration', @@ -83,8 +84,8 @@ export class GatewayAdvancedConfigurationComponent implements OnDestroy, Control this.onTouched = fn; } - writeValue(basicConfig: unknown): void { - this.advancedFormControl.reset(basicConfig, {emitEvent: false}); + writeValue(advancedConfig: GatewayConfigValue): void { + this.advancedFormControl.reset(advancedConfig, {emitEvent: false}); } validate(): ValidationErrors | null { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/configuration/basic/gateway-basic-configuration.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/configuration/basic/gateway-basic-configuration.component.html index 9c67bd2eaf..5f33f6e00c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/configuration/basic/gateway-basic-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/configuration/basic/gateway-basic-configuration.component.html @@ -640,10 +640,11 @@