From 09062adf39452c5e381d5a0e7fb8ab05af5812e1 Mon Sep 17 00:00:00 2001 From: Maksym Dudnik Date: Thu, 25 May 2023 13:03:05 +0300 Subject: [PATCH] fixes --- .../components/device/gateway-connectors.component.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts b/ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts index 695e3efbb3..1e0ba718d6 100644 --- a/ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts +++ b/ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts @@ -133,6 +133,7 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie log_level: ['', [Validators.required]], key: ['auto'], class: [''], + configuration: [''], configurationJson: [{}, [Validators.required]] }) @@ -155,7 +156,7 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie this.viewsInited = true; if (this.device) { - forkJoin(this.attributeService.getEntityAttributes(this.device, AttributeScope.SHARED_SCOPE, ['active_connectors']), + forkJoin(this.attributeService.getEntityAttributes(this.device, AttributeScope.CLIENT_SCOPE, ['active_connectors']), this.attributeService.getEntityAttributes(this.device, AttributeScope.SERVER_SCOPE, ['inactive_connectors'])).subscribe(attributes => { if (attributes.length) { this.activeConnectors = attributes[0].length ? attributes[0][0].value : []; @@ -251,6 +252,7 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie log_level: GatewayLogLevel.info, key: 'auto', class: '', + configuration: '', configurationJson: {} }) this.initialConnector = null; @@ -262,9 +264,9 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie this.connectorForm.enable(); } const connector = attribute.value; - if (connector.configuration) { - delete connector.configuration; - } + // if (connector.configuration) { + // delete connector.configuration; + // } if (!connector.key) { connector.key = 'auto'; }