From f97d08c59a7834f96512c181f09b551875c89409 Mon Sep 17 00:00:00 2001 From: mpetrov Date: Thu, 13 Jun 2024 14:46:30 +0300 Subject: [PATCH 1/2] [PROD-3650] [FIX] Changed method field in SNMP Connector --- ...-service-rpc-connector-templates.component.html | 5 ++++- ...ay-service-rpc-connector-templates.component.ts | 4 +++- .../widget/lib/gateway/gateway-widget.models.ts | 14 +++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector-templates.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector-templates.component.html index c0f6997a36..9a8a0b4152 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector-templates.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector-templates.component.html @@ -47,7 +47,10 @@
- {{config.value}}
+ + + {{ config.value }} + {{ 'gateway.rpc.' + SNMPMethodsTitles[config.value] | translate }} 0; public readonly isObject = (value: any) => isLiteralObject(value); + public readonly SNMPMethodsTitles = SNMPMethodsTitles; constructor(private attributeService: AttributeService) { } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts index 0e143cff36..af349aa99e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts @@ -261,6 +261,18 @@ export enum SNMPMethods { WALKS = "walk" } +export enum SNMPMethodsTitles { + set = 'set', + multiset = "multiset", + get = "get", + bulkwalk = "bulk-walk", + table = "table", + multiget = "multi-get", + getnext = "get-next", + bulkget = "bulk-get", + walk = "walk" +} + export const SNMPMethodsTranslations = new Map([ [SNMPMethods.SET, 'gateway.rpc.set'], [SNMPMethods.MULTISET, 'gateway.rpc.multiset'], @@ -269,7 +281,7 @@ export const SNMPMethodsTranslations = new Map([ [SNMPMethods.TABLE, 'gateway.rpc.table'], [SNMPMethods.MULTIGET, 'gateway.rpc.multi-get'], [SNMPMethods.GETNEXT, 'gateway.rpc.get-next'], - [SNMPMethods.BULKGET, 'gateway.rpc.bul-kget'], + [SNMPMethods.BULKGET, 'gateway.rpc.bulk-get'], [SNMPMethods.WALKS, 'gateway.rpc.walk'] ]) From 797902ced9e4287937cee9e5023a4e4c91bcbde2 Mon Sep 17 00:00:00 2001 From: mpetrov Date: Thu, 13 Jun 2024 15:33:13 +0300 Subject: [PATCH 2/2] [PROD-3650] [FIX] refactoring --- ...ay-service-rpc-connector-templates.component.html | 2 +- ...eway-service-rpc-connector-templates.component.ts | 4 ++-- .../widget/lib/gateway/gateway-widget.models.ts | 12 ------------ 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector-templates.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector-templates.component.html index 9a8a0b4152..d161f402dd 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector-templates.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector-templates.component.html @@ -50,7 +50,7 @@ {{ config.value }} - {{ 'gateway.rpc.' + SNMPMethodsTitles[config.value] | translate }} + {{ SNMPMethodsTranslations.get(config.value) | translate }} 0; public readonly isObject = (value: any) => isLiteralObject(value); - public readonly SNMPMethodsTitles = SNMPMethodsTitles; + public readonly SNMPMethodsTranslations = SNMPMethodsTranslations; constructor(private attributeService: AttributeService) { } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts index af349aa99e..3c02deb49b 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts @@ -261,18 +261,6 @@ export enum SNMPMethods { WALKS = "walk" } -export enum SNMPMethodsTitles { - set = 'set', - multiset = "multiset", - get = "get", - bulkwalk = "bulk-walk", - table = "table", - multiget = "multi-get", - getnext = "get-next", - bulkget = "bulk-get", - walk = "walk" -} - export const SNMPMethodsTranslations = new Map([ [SNMPMethods.SET, 'gateway.rpc.set'], [SNMPMethods.MULTISET, 'gateway.rpc.multiset'],