From 37e23294d41ba6ba57b1099e5fad78cfe7c5965c Mon Sep 17 00:00:00 2001 From: ArtemDzhereleiko Date: Mon, 12 Jan 2026 14:09:49 +0200 Subject: [PATCH 1/2] UI: Fixed cf pages minor bugs and change default color for operation for alarm rule --- .../filter/alarm-rule-filter-list.component.scss | 8 +++++--- .../alarm-rule-filter-predicate-list.component.scss | 8 +++++--- .../calculated-fields/calculated-field.component.ts | 2 +- .../output/calculated-field-output.component.ts | 2 +- .../propagation-configuration.component.ts | 2 +- .../simple-configuration.component.ts | 1 + .../app/shared/components/time-unit-input.component.ts | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-list.component.scss b/ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-list.component.scss index 985088b568..fea71605c8 100644 --- a/ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-list.component.scss +++ b/ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-list.component.scss @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@import "../../../../../../scss/constants"; + :host { .filter-title { padding: 12px 0; @@ -45,11 +47,11 @@ &-label { font-size: 15px; font-weight: 400; - color: #00695C; + color: $tb-primary-color; padding: 0 8px; border-radius: 4px; - border: 1px solid rgba(#00695C, 0.32); - background-color: rgba(#00695C, 0.04); + border: 1px solid rgba($tb-primary-color, 0.32); + background-color: rgba($tb-primary-color, 0.04); } } diff --git a/ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-predicate-list.component.scss b/ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-predicate-list.component.scss index 5a6318dde5..e5e6dbeba4 100644 --- a/ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-predicate-list.component.scss +++ b/ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-predicate-list.component.scss @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@import "../../../../../../scss/constants"; + :host { .filter-title { padding: 12px 8px; @@ -40,11 +42,11 @@ &-label { font-size: 15px; font-weight: 400; - color: #00695C; + color: $tb-primary-color; padding: 0 8px; border-radius: 4px; - border: 1px solid rgba(#00695C, 0.32); - background-color: rgba(#00695C, 0.04); + border: 1px solid rgba($tb-primary-color, 0.32); + background-color: rgba($tb-primary-color, 0.04); } } } diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts index 20ebe549a2..284c07b9ec 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts @@ -121,7 +121,7 @@ export class CalculatedFieldComponent extends EntityComponent { this.entityForm.patchValue({ configuration: preparedConfig, debugSettings, entityId, ...value }, {emitEvent: false}); }); diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts index 972b74a9f7..c8cb145cfa 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts @@ -213,7 +213,7 @@ export class CalculatedFieldOutputComponent implements ControlValueAccessor, Val private updatedFormWithMode(): void { if (this.simpleMode && !this.hiddenName) { - this.outputForm.get('name').enable({emitEvent: false}); + this.outputForm.get('name').enable({emitEvent: true}); } else { this.outputForm.get('name').disable({emitEvent: false}); } diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.ts index 7aef195480..bbb0345a1b 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.ts @@ -137,7 +137,7 @@ export class PropagationConfigurationComponent implements ControlValueAccessor, this.updatedFormWithScript(); } setTimeout(() => { - this.propagateConfiguration.get('arguments').updateValueAndValidity({onlySelf: true, emitEvent: false}); + this.propagateConfiguration.get('arguments').updateValueAndValidity({onlySelf: true}); }); } diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts index fd86a65621..fd2e0783af 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts @@ -155,6 +155,7 @@ export class SimpleConfigurationComponent implements ControlValueAccessor, Valid this.simpleConfiguration.patchValue(formValue, {emitEvent: false}); setTimeout(() => { this.simpleConfiguration.get('arguments').updateValueAndValidity({onlySelf: true}); + this.simpleConfiguration.get('output').updateValueAndValidity({onlySelf: true}); }); } diff --git a/ui-ngx/src/app/shared/components/time-unit-input.component.ts b/ui-ngx/src/app/shared/components/time-unit-input.component.ts index 95e5a3f8e1..ce1c7bd817 100644 --- a/ui-ngx/src/app/shared/components/time-unit-input.component.ts +++ b/ui-ngx/src/app/shared/components/time-unit-input.component.ts @@ -232,7 +232,7 @@ export class TimeUnitInputComponent implements ControlValueAccessor, Validator, writeValue(sec: number) { if (sec !== this.modelValue) { if (isDefinedAndNotNull(sec) && isNumeric(sec) && Number(sec) !== 0) { - this.timeInputForm.patchValue(this.parseTime(sec), {emitEvent: false}); + this.timeInputForm.patchValue(this.parseTime(sec), {emitEvent: true}); this.modelValue = sec; } else { this.timeInputForm.patchValue({ From b30ec4b123f00af5741c3d950009807b892798f1 Mon Sep 17 00:00:00 2001 From: ArtemDzhereleiko Date: Tue, 13 Jan 2026 12:34:23 +0200 Subject: [PATCH 2/2] UI: Fixed propagete form --- .../calculated-fields/calculated-field.component.ts | 3 ++- .../components/output/calculated-field-output.component.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts index 284c07b9ec..f9edffa964 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts @@ -121,9 +121,10 @@ export class CalculatedFieldComponent extends EntityComponent { this.entityForm.patchValue({ configuration: preparedConfig, debugSettings, entityId, ...value }, {emitEvent: false}); + this.entityForm.get('type').updateValueAndValidity(); }); } diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts index c8cb145cfa..a9924909b7 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts @@ -186,6 +186,9 @@ export class CalculatedFieldOutputComponent implements ControlValueAccessor, Val this.toggleScopeByOutputType(this.outputForm.get('type').value); this.updatedStrategy(); this.updateTimeSeriesTtl(this.outputForm.get('strategy.saveTimeSeries').value); + if (this.outputForm.invalid) { + this.outputForm.updateValueAndValidity(); + } } } @@ -213,7 +216,7 @@ export class CalculatedFieldOutputComponent implements ControlValueAccessor, Val private updatedFormWithMode(): void { if (this.simpleMode && !this.hiddenName) { - this.outputForm.get('name').enable({emitEvent: true}); + this.outputForm.get('name').enable({emitEvent: false}); } else { this.outputForm.get('name').disable({emitEvent: false}); }