From 73fac5be7072387e552f70cf1a568aa2430e77b1 Mon Sep 17 00:00:00 2001 From: Maksym Dudnik Date: Thu, 25 May 2023 15:37:45 +0300 Subject: [PATCH] fixes --- .../components/device/gateway-connectors.component.html | 2 +- .../shared/components/device/gateway-connectors.component.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/device/gateway-connectors.component.html b/ui-ngx/src/app/shared/components/device/gateway-connectors.component.html index 3a6b99dfba..387f8707d4 100644 --- a/ui-ngx/src/app/shared/components/device/gateway-connectors.component.html +++ b/ui-ngx/src/app/shared/components/device/gateway-connectors.component.html @@ -50,7 +50,7 @@ Type - {{ gatewayConnectorDefaultTypes.get(attribute.value.type) }} + {{ returnType(attribute) }} 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 16c5f173c9..7049f6e236 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 @@ -303,6 +303,11 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie })); } + returnType (attribute) { + const value = typeof attribute.value === 'string' ? JSON.parse(attribute.value): attribute.value; + return this.gatewayConnectorDefaultTypes.get(value.type) + } + deleteConnector(attribute: AttributeData, $event: Event): void { if ($event) { $event.stopPropagation();