From 205e930d88d059062651313bc00a879b0cb4e8bf Mon Sep 17 00:00:00 2001 From: mpetrov Date: Fri, 21 Jun 2024 15:08:09 +0300 Subject: [PATCH 1/3] Added Connector Name to Gateway Connector Logs --- application/src/main/data/json/tenant/dashboards/gateways.json | 2 +- ui-ngx/src/app/core/utils.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/src/main/data/json/tenant/dashboards/gateways.json b/application/src/main/data/json/tenant/dashboards/gateways.json index 42c4f199b5..8f426b1624 100644 --- a/application/src/main/data/json/tenant/dashboards/gateways.json +++ b/application/src/main/data/json/tenant/dashboards/gateways.json @@ -880,7 +880,7 @@ "isConnectorLog": true, "connectorLogState": "connector_logs" }, - "title": "Gateway Logs", + "title": "${entityNameLogs}", "showTitleIcon": false, "dropShadow": true, "enableFullscreen": true, diff --git a/ui-ngx/src/app/core/utils.ts b/ui-ngx/src/app/core/utils.ts index dc9ed5004b..a15e9462f3 100644 --- a/ui-ngx/src/app/core/utils.ts +++ b/ui-ngx/src/app/core/utils.ts @@ -415,6 +415,8 @@ export const createLabelFromDatasource = (datasource: Datasource, pattern: strin label = label.replace(variable, datasource.name); } else if (variableName === 'entityName') { label = label.replace(variable, datasource.entityName); + } else if (variableName === 'entityNameLogs') { + label = label.replace(variable, datasource.entityName + ' Logs'); } else if (variableName === 'deviceName') { label = label.replace(variable, datasource.entityName); } else if (variableName === 'entityLabel') { From 03b64319318053fd0b38bba419307fd93cba3ea5 Mon Sep 17 00:00:00 2001 From: mpetrov Date: Fri, 21 Jun 2024 16:36:40 +0300 Subject: [PATCH 2/3] refactoring --- .../src/main/data/json/tenant/dashboards/gateways.json | 2 +- ui-ngx/src/app/core/utils.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/application/src/main/data/json/tenant/dashboards/gateways.json b/application/src/main/data/json/tenant/dashboards/gateways.json index ec6388abc3..11813ae878 100644 --- a/application/src/main/data/json/tenant/dashboards/gateways.json +++ b/application/src/main/data/json/tenant/dashboards/gateways.json @@ -880,7 +880,7 @@ "isConnectorLog": true, "connectorLogState": "connector_logs" }, - "title": "${entityNameLogs}", + "title": "${entityName} Logs", "showTitleIcon": false, "dropShadow": true, "enableFullscreen": true, diff --git a/ui-ngx/src/app/core/utils.ts b/ui-ngx/src/app/core/utils.ts index a15e9462f3..3bdb49e070 100644 --- a/ui-ngx/src/app/core/utils.ts +++ b/ui-ngx/src/app/core/utils.ts @@ -415,9 +415,7 @@ export const createLabelFromDatasource = (datasource: Datasource, pattern: strin label = label.replace(variable, datasource.name); } else if (variableName === 'entityName') { label = label.replace(variable, datasource.entityName); - } else if (variableName === 'entityNameLogs') { - label = label.replace(variable, datasource.entityName + ' Logs'); - } else if (variableName === 'deviceName') { + } else if (variableName === 'deviceName') { label = label.replace(variable, datasource.entityName); } else if (variableName === 'entityLabel') { label = label.replace(variable, datasource.entityLabel || datasource.entityName); From 4c322ad62b0187e127d7f05475bf7915488b7c18 Mon Sep 17 00:00:00 2001 From: mpetrov Date: Fri, 21 Jun 2024 16:37:37 +0300 Subject: [PATCH 3/3] refactoring --- ui-ngx/src/app/core/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/core/utils.ts b/ui-ngx/src/app/core/utils.ts index 3bdb49e070..dc9ed5004b 100644 --- a/ui-ngx/src/app/core/utils.ts +++ b/ui-ngx/src/app/core/utils.ts @@ -415,7 +415,7 @@ export const createLabelFromDatasource = (datasource: Datasource, pattern: strin label = label.replace(variable, datasource.name); } else if (variableName === 'entityName') { label = label.replace(variable, datasource.entityName); - } else if (variableName === 'deviceName') { + } else if (variableName === 'deviceName') { label = label.replace(variable, datasource.entityName); } else if (variableName === 'entityLabel') { label = label.replace(variable, datasource.entityLabel || datasource.entityName);