From 41a3e6c22ebddaaa83161219c64a6f1eff93f5f0 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 26 May 2023 12:21:32 +0300 Subject: [PATCH] UI: Refactoring --- .../profile/queue/tenant-profile-queues.component.ts | 6 +++--- .../default-tenant-profile-configuration.component.html | 4 ++-- .../modules/home/components/queue/queue-form.component.html | 4 ++-- ui-ngx/src/assets/locale/locale.constant-en_US.json | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts b/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts index c3ff3ccc4c..8f510cfbda 100644 --- a/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts @@ -14,7 +14,7 @@ /// limitations under the License. /// -import { Component, forwardRef, Input, OnDestroy } from '@angular/core'; +import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, @@ -53,7 +53,7 @@ import { takeUntil } from 'rxjs/operators'; } ] }) -export class TenantProfileQueuesComponent implements ControlValueAccessor, Validator, OnDestroy { +export class TenantProfileQueuesComponent implements ControlValueAccessor, Validator, OnInit, OnDestroy { tenantProfileQueuesFormGroup: UntypedFormGroup; newQueue = false; @@ -115,7 +115,7 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid } writeValue(queues: Array | null): void { - if (queues.length === this.queuesFormArray.length) { + if (queues?.length === this.queuesFormArray.length) { this.queuesFormArray.patchValue(queues, {emitEvent: false}); } else { const queuesControls: Array = []; diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html index 4e287a888c..0edb1b4b47 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html @@ -338,10 +338,10 @@ formControlName="maxOtaPackagesInBytes" type="number"> - {{ 'tenant-profile.maximum-ota-packages-sum-data-size-required' | translate}} + {{ 'tenant-profile.maximum-ota-package-sum-data-size-required' | translate}} - {{ 'tenant-profile.maximum-ota-packages-sum-data-size-range' | translate}} + {{ 'tenant-profile.maximum-ota-package-sum-data-size-range' | translate}} diff --git a/ui-ngx/src/app/modules/home/components/queue/queue-form.component.html b/ui-ngx/src/app/modules/home/components/queue/queue-form.component.html index 9fee72fef4..56b20d8aa8 100644 --- a/ui-ngx/src/app/modules/home/components/queue/queue-form.component.html +++ b/ui-ngx/src/app/modules/home/components/queue/queue-form.component.html @@ -37,7 +37,7 @@ -
+
@@ -75,7 +75,7 @@ -
+
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 933462b06b..bcaa4a183f 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -3600,8 +3600,8 @@ "maximum-resources-sum-data-size-required": "Resource files sum size is required.", "maximum-resources-sum-data-size-range": "Resource files sum size can`t be negative", "maximum-ota-packages-sum-data-size": "OTA package files sum size", - "maximum-ota-packages-sum-data-size-required": "OTA package files sum size is required.", - "maximum-ota-packages-sum-data-size-range": "OTA package files sum size can`t be negative", + "maximum-ota-package-sum-data-size-required": "OTA package files sum size is required.", + "maximum-ota-package-sum-data-size-range": "OTA package files sum size can`t be negative", "rest-requests-for-tenant": "REST requests for tenant", "transport-tenant-telemetry-msg-rate-limit": "Transport tenant telemetry messages", "transport-tenant-telemetry-data-points-rate-limit": "Transport tenant telemetry data points",