Browse Source
Merge pull request #14784 from ArtemDzhereleiko/AD/bug-fix/cf-alarm-rule-page-and-color
Fixed cf pages minor bugs and change default color for operation for alarm rule
pull/14794/head
Vladyslav Prykhodko
7 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with
17 additions and
8 deletions
-
ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-list.component.scss
-
ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-predicate-list.component.scss
-
ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts
-
ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts
-
ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.ts
-
ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts
-
ui-ngx/src/app/shared/components/time-unit-input.component.ts
|
|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -124,6 +124,7 @@ export class CalculatedFieldComponent extends EntityComponent<CalculatedFieldsTa |
|
|
|
this.entityForm.patchValue({ type }, {emitEvent: false, onlySelf: true}); |
|
|
|
setTimeout(() => { |
|
|
|
this.entityForm.patchValue({ configuration: preparedConfig, debugSettings, entityId, ...value }, {emitEvent: false}); |
|
|
|
this.entityForm.get('type').updateValueAndValidity(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -143,7 +143,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}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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({ |
|
|
|
|