From 33eec47856f0582c01dfac06a5f1acd496e183ad Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Thu, 9 Jul 2020 11:18:52 +0300 Subject: [PATCH] UI: Allow creation of attributes and entity field keys for alarm datasource --- .../home/components/widget/data-key-config.component.ts | 3 +++ .../modules/home/components/widget/data-keys.component.html | 4 ++-- .../app/modules/home/components/widget/data-keys.component.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/data-key-config.component.ts b/ui-ngx/src/app/modules/home/components/widget/data-key-config.component.ts index 7696b18c76..aef60007bf 100644 --- a/ui-ngx/src/app/modules/home/components/widget/data-key-config.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/data-key-config.component.ts @@ -187,6 +187,9 @@ export class DataKeyConfigComponent extends PageComponent implements OnInit, Con if (this.displayAdvanced) { this.modelValue.settings = this.dataKeySettingsFormGroup.get('settings').value.model; } + if (this.modelValue.name) { + this.modelValue.name = this.modelValue.name.trim(); + } this.propagateChange(this.modelValue); } diff --git a/ui-ngx/src/app/modules/home/components/widget/data-keys.component.html b/ui-ngx/src/app/modules/home/components/widget/data-keys.component.html index 50e5d5b6ac..4ae9af977b 100644 --- a/ui-ngx/src/app/modules/home/components/widget/data-keys.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/data-keys.component.html @@ -139,14 +139,14 @@ notifications - -