From 9aec9f03ca57c24a353ae4bb8cfde68f0101c4fe Mon Sep 17 00:00:00 2001 From: ArtemDzhereleiko Date: Thu, 29 Jan 2026 18:37:20 +0200 Subject: [PATCH] UI: Fixed alarm rules console errors --- .../components/alarm-rules/alarm-rule-dialog.component.ts | 2 +- .../cf-alarm-rule-condition-dialog.component.html | 2 +- .../alarm-rules/cf-alarm-rule-condition-dialog.component.ts | 5 +++++ .../alarm-rules/cf-alarm-rule-condition.component.ts | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/alarm-rules/alarm-rule-dialog.component.ts b/ui-ngx/src/app/modules/home/components/alarm-rules/alarm-rule-dialog.component.ts index f054616f20..2c116aac86 100644 --- a/ui-ngx/src/app/modules/home/components/alarm-rules/alarm-rule-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/alarm-rules/alarm-rule-dialog.component.ts @@ -180,7 +180,7 @@ export class AlarmRuleDialogComponent extends DialogComponent
{{ 'alarm-rule.type' | translate }}
- + {{ alarmConditionTypeTranslation.get(alarmConditionType) | translate }} diff --git a/ui-ngx/src/app/modules/home/components/alarm-rules/cf-alarm-rule-condition-dialog.component.ts b/ui-ngx/src/app/modules/home/components/alarm-rules/cf-alarm-rule-condition-dialog.component.ts index f39ed364fd..946d9db193 100644 --- a/ui-ngx/src/app/modules/home/components/alarm-rules/cf-alarm-rule-condition-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/alarm-rules/cf-alarm-rule-condition-dialog.component.ts @@ -228,6 +228,11 @@ export class CfAlarmRuleConditionDialogComponent extends DialogComponent) { diff --git a/ui-ngx/src/app/modules/home/components/alarm-rules/cf-alarm-rule-condition.component.ts b/ui-ngx/src/app/modules/home/components/alarm-rules/cf-alarm-rule-condition.component.ts index 8ff7e2c083..ae219d4446 100644 --- a/ui-ngx/src/app/modules/home/components/alarm-rules/cf-alarm-rule-condition.component.ts +++ b/ui-ngx/src/app/modules/home/components/alarm-rules/cf-alarm-rule-condition.component.ts @@ -295,6 +295,9 @@ export class CfAlarmRuleConditionComponent implements ControlValueAccessor, Vali } }).afterClosed().subscribe((result) => { if (result) { + if (!this.modelValue) { + this.modelValue = {} as AlarmRuleCondition; + } this.modelValue.schedule = result; this.updateModel(); }