From 1d61b4f439056ad9daaf35117eb6494830fec115 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 29 Sep 2020 18:31:17 +0300 Subject: [PATCH] UI: Device profile alarm rules added dynamic source type - current device --- .../components/filter/filter-predicate-value.component.ts | 2 ++ ui-ngx/src/app/shared/models/query/query.models.ts | 6 ++++-- ui-ngx/src/assets/locale/locale.constant-en_US.json | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/filter/filter-predicate-value.component.ts b/ui-ngx/src/app/modules/home/components/filter/filter-predicate-value.component.ts index aa430e596e..b5e867e08b 100644 --- a/ui-ngx/src/app/modules/home/components/filter/filter-predicate-value.component.ts +++ b/ui-ngx/src/app/modules/home/components/filter/filter-predicate-value.component.ts @@ -52,6 +52,8 @@ export class FilterPredicateValueComponent implements ControlValueAccessor, OnIn DynamicValueSourceType.CURRENT_CUSTOMER]; if (allow) { this.dynamicValueSourceTypes.push(DynamicValueSourceType.CURRENT_USER); + } else { + this.dynamicValueSourceTypes.push(DynamicValueSourceType.CURRENT_DEVICE); } } diff --git a/ui-ngx/src/app/shared/models/query/query.models.ts b/ui-ngx/src/app/shared/models/query/query.models.ts index 3d3223bf34..3f4b6896db 100644 --- a/ui-ngx/src/app/shared/models/query/query.models.ts +++ b/ui-ngx/src/app/shared/models/query/query.models.ts @@ -269,14 +269,16 @@ export const complexOperationTranslationMap = new Map( export enum DynamicValueSourceType { CURRENT_TENANT = 'CURRENT_TENANT', CURRENT_CUSTOMER = 'CURRENT_CUSTOMER', - CURRENT_USER = 'CURRENT_USER' + CURRENT_USER = 'CURRENT_USER', + CURRENT_DEVICE = 'CURRENT_DEVICE' } export const dynamicValueSourceTypeTranslationMap = new Map( [ [DynamicValueSourceType.CURRENT_TENANT, 'filter.current-tenant'], [DynamicValueSourceType.CURRENT_CUSTOMER, 'filter.current-customer'], - [DynamicValueSourceType.CURRENT_USER, 'filter.current-user'] + [DynamicValueSourceType.CURRENT_USER, 'filter.current-user'], + [DynamicValueSourceType.CURRENT_DEVICE, 'filter.current-device'] ] ); 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 29b5ceb303..c98a2d5c17 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -1347,6 +1347,7 @@ "current-tenant": "Current tenant", "current-customer": "Current customer", "current-user": "Current user", + "current-device": "Current device", "default-value": "Default value", "dynamic-source-type": "Dynamic source type", "no-dynamic-value": "No dynamic value",