diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.component.html b/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.component.html
index 2c4b82e4ab..3a6591790f 100644
--- a/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.component.html
+++ b/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.component.html
@@ -19,14 +19,14 @@
diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.component.ts b/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.component.ts
index 34cbadb755..75318c41cb 100644
--- a/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.component.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.component.ts
@@ -30,7 +30,6 @@ import {
RateLimitsDetailsDialogData
} from '@home/components/profile/tenant/rate-limits/rate-limits-details-dialog.component';
import {
- addRateLimitTranslationMap,
editRateLimitTranslationMap,
rateLimitLabelTranslationMap,
RateLimitsType,
@@ -106,11 +105,11 @@ export class RateLimitsComponent implements ControlValueAccessor, OnInit, Valida
return null;
}
- public onClick($event: Event, action: string) {
+ public onClick($event: Event) {
if ($event) {
$event.stopPropagation();
}
- const title = this.setTitle(action);
+ const title = editRateLimitTranslationMap.get(this.type);
this.dialog.open(RateLimitsDetailsDialogComponent, {
disableClose: true,
@@ -128,15 +127,6 @@ export class RateLimitsComponent implements ControlValueAccessor, OnInit, Valida
});
}
- private setTitle(action: string): string {
- switch (action) {
- case 'add':
- return addRateLimitTranslationMap.get(this.type);
- case 'edit':
- return editRateLimitTranslationMap.get(this.type);
- }
- }
-
private updateRateLimitsInfo() {
this.rateLimitsFormGroup.patchValue(
{
diff --git a/ui-ngx/src/app/shared/models/rate-limits.models.ts b/ui-ngx/src/app/shared/models/rate-limits.models.ts
index ffde8a3c87..f035d9f67c 100644
--- a/ui-ngx/src/app/shared/models/rate-limits.models.ts
+++ b/ui-ngx/src/app/shared/models/rate-limits.models.ts
@@ -70,23 +70,6 @@ export const editRateLimitTranslationMap = new Map(
]
);
-export const addRateLimitTranslationMap = new Map(
- [
- [RateLimitsType.TENANT_MESSAGES, 'tenant-profile.rate-limits.add-transport-tenant-msg-title'],
- [RateLimitsType.TENANT_TELEMETRY_MESSAGES, 'tenant-profile.rate-limits.add-transport-tenant-telemetry-msg-title'],
- [RateLimitsType.TENANT_TELEMETRY_DATA_POINTS, 'tenant-profile.rate-limits.add-transport-tenant-telemetry-data-points-title'],
- [RateLimitsType.DEVICE_MESSAGES, 'tenant-profile.rate-limits.add-transport-device-msg-title'],
- [RateLimitsType.DEVICE_TELEMETRY_MESSAGES, 'tenant-profile.rate-limits.add-transport-device-telemetry-msg-title'],
- [RateLimitsType.DEVICE_TELEMETRY_DATA_POINTS, 'tenant-profile.rate-limits.add-transport-device-telemetry-data-points-title'],
- [RateLimitsType.TENANT_SERVER_REST_LIMITS_CONFIGURATION, 'tenant-profile.rate-limits.add-transport-tenant-msg-rate-limit-title'],
- [RateLimitsType.CUSTOMER_SERVER_REST_LIMITS_CONFIGURATION, 'tenant-profile.rate-limits.add-customer-rest-limits-title'],
- [RateLimitsType.WS_UPDATE_PER_SESSION_RATE_LIMIT, 'tenant-profile.rate-limits.add-ws-limit-updates-per-session-title'],
- [RateLimitsType.CASSANDRA_QUERY_TENANT_RATE_LIMITS_CONFIGURATION, 'tenant-profile.rate-limits.add-cassandra-tenant-limits-configuration-title'],
- [RateLimitsType.TENANT_ENTITY_EXPORT_RATE_LIMIT, 'tenant-profile.rate-limits.add-tenant-entity-export-rate-limit-title'],
- [RateLimitsType.TENANT_ENTITY_IMPORT_RATE_LIMIT, 'tenant-profile.rate-limits.add-tenant-entity-import-rate-limit-title'],
- ]
-);
-
export function stringToRateLimitsArray(rateLimits: string): Array {
const result: Array = [];
if (rateLimits?.length > 0) {
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 371ade779c..612823b803 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -3190,18 +3190,6 @@
"ws-limit-updates-per-session": "WS updates per session",
"rate-limits": {
"add-limit": "Add limit",
- "add-transport-tenant-msg-title": "Add transport tenant messages rate limits",
- "add-transport-tenant-telemetry-msg-title": "Add transport tenant telemetry messages rate limits",
- "add-transport-tenant-telemetry-data-points-title": "Add transport tenant telemetry data points rate limits",
- "add-transport-device-msg-title": "Add transport device messages rate limits",
- "add-transport-device-telemetry-msg-title": "Add transport device telemetry messages rate limits",
- "add-transport-device-telemetry-data-points-title": "Add transport device telemetry data points rate limits",
- "add-transport-tenant-msg-rate-limit-title": "Add transport tenant messages rate limits",
- "add-customer-rest-limits-title": "Add REST requests for customer rate limits",
- "add-ws-limit-updates-per-session-title": "Add WS updates per session rate limits",
- "add-cassandra-tenant-limits-configuration-title": "Add Cassandra query for tenant rate limits",
- "add-tenant-entity-export-rate-limit-title": "Add entity version creation rate limits",
- "add-tenant-entity-import-rate-limit-title": "Add entity version load rate limits",
"advanced-settings": "Advanced settings",
"edit-limit": "Edit limit",
"but-less-than": "but less than",