From 8634916bb2ec1e3c3d55309c2cc2d27109a3a80a Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Mon, 15 May 2023 14:33:49 +0300 Subject: [PATCH 1/6] UI: Fixed api usage widget fill color --- .../home/pages/api-usage/api_usage_json.raw | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw b/ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw index a4c9801720..769849cc9e 100644 --- a/ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw +++ b/ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw @@ -32,8 +32,8 @@ "units": null, "decimals": null, "funcBody": null, - "usePostProcessing": null, - "postFuncBody": null + "usePostProcessing": true, + "postFuncBody": "return value ? value : 'ENABLED';" }, { "name": "jsExecutionLimit", @@ -72,7 +72,7 @@ "decimals": null, "funcBody": null, "usePostProcessing": true, - "postFuncBody": "return value ? value.toLowerCase() : '';" + "postFuncBody": "return value ? value.toLowerCase() : 'enabled';" }, { "name": "jsExecutionApiState", @@ -190,8 +190,8 @@ "units": null, "decimals": null, "funcBody": null, - "usePostProcessing": null, - "postFuncBody": null + "usePostProcessing": true, + "postFuncBody": "return value ? value : 'ENABLED';" }, { "name": "storageDataPointsLimit", @@ -230,7 +230,7 @@ "decimals": null, "funcBody": null, "usePostProcessing": true, - "postFuncBody": "return value ? value.toLowerCase() : '';" + "postFuncBody": "return value ? value.toLowerCase() : 'enabled';" }, { "name": "dbApiState", @@ -348,8 +348,8 @@ "units": null, "decimals": null, "funcBody": null, - "usePostProcessing": null, - "postFuncBody": null + "usePostProcessing": true, + "postFuncBody": "return value ? value : 'ENABLED';" }, { "name": "ruleEngineExecutionLimit", @@ -388,7 +388,7 @@ "decimals": null, "funcBody": null, "usePostProcessing": true, - "postFuncBody": "return value ? value.toLowerCase() : '';" + "postFuncBody": "return value ? value.toLowerCase() : 'enabled';" }, { "name": "ruleEngineApiState", @@ -516,8 +516,8 @@ "units": null, "decimals": null, "funcBody": null, - "usePostProcessing": null, - "postFuncBody": null + "usePostProcessing": true, + "postFuncBody": "return value ? value : 'ENABLED';" }, { "name": "transportMsgLimit", @@ -556,7 +556,7 @@ "decimals": null, "funcBody": null, "usePostProcessing": true, - "postFuncBody": "return value ? value.toLowerCase() : '';" + "postFuncBody": "return value ? value.toLowerCase() : 'enabled';" }, { "name": "transportApiState", @@ -687,8 +687,8 @@ "units": null, "decimals": null, "funcBody": null, - "usePostProcessing": null, - "postFuncBody": null + "usePostProcessing": true, + "postFuncBody": "return value ? value : 'ENABLED';" }, { "name": "createdAlarmsLimit", @@ -727,7 +727,7 @@ "decimals": null, "funcBody": null, "usePostProcessing": true, - "postFuncBody": "return value ? value.toLowerCase() : '';" + "postFuncBody": "return value ? value.toLowerCase() : 'enabled';" }, { "name": "alarmApiState", From 733a2a03e4b8b7d1dfa4c9ff5d7f3951574e5ed7 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 19 May 2023 10:55:19 +0300 Subject: [PATCH 2/6] UI: Custom translate for alarm type --- .../home/components/alarm/alarm-details-dialog.component.ts | 4 +++- .../app/modules/home/components/alarm/alarm-table-config.ts | 3 ++- .../components/notification/notification.component.html | 2 +- .../shared/components/notification/notification.component.ts | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-details-dialog.component.ts b/ui-ngx/src/app/modules/home/components/alarm/alarm-details-dialog.component.ts index cfd2251ea7..57578cae73 100644 --- a/ui-ngx/src/app/modules/home/components/alarm/alarm-details-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-details-dialog.component.ts @@ -35,6 +35,7 @@ import { DatePipe } from '@angular/common'; import { TranslateService } from '@ngx-translate/core'; import { AlarmCommentComponent } from '@home/components/alarm/alarm-comment.component'; import { MillisecondsToTimeStringPipe } from '@shared/pipe/milliseconds-to-time-string.pipe'; +import { UtilsService } from '@core/services/utils.service'; export interface AlarmDetailsDialogData { alarmId?: string; @@ -79,6 +80,7 @@ export class AlarmDetailsDialogComponent extends DialogComponent, public fb: UntypedFormBuilder) { super(store, router, dialogRef); @@ -136,7 +138,7 @@ export class AlarmDetailsDialogComponent extends DialogComponent new EntityTableColumn('originatorName', 'alarm.originator', '25%', (entity) => entity.originatorName, entity => ({}), false)); this.columns.push( - new EntityTableColumn('type', 'alarm.type', '25%')); + new EntityTableColumn('type', 'alarm.type', '25%', + entity => this.utilsService.customTranslation(entity.type, entity.type))); this.columns.push( new EntityTableColumn('severity', 'alarm.severity', '25%', (entity) => this.translate.instant(alarmSeverityTranslations.get(entity.severity)), diff --git a/ui-ngx/src/app/shared/components/notification/notification.component.html b/ui-ngx/src/app/shared/components/notification/notification.component.html index 6801ef0c20..a7da0c1865 100644 --- a/ui-ngx/src/app/shared/components/notification/notification.component.html +++ b/ui-ngx/src/app/shared/components/notification/notification.component.html @@ -28,7 +28,7 @@
-
+