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
parent
commit
24121cb50c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-list.component.scss
  2. 8
      ui-ngx/src/app/modules/home/components/alarm-rules/filter/alarm-rule-filter-predicate-list.component.scss
  3. 1
      ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts
  4. 3
      ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts
  5. 2
      ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.ts
  6. 1
      ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts
  7. 2
      ui-ngx/src/app/shared/components/time-unit-input.component.ts

8
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);
}
}

8
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);
}
}
}

1
ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts

@ -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();
});
}

3
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();
}
}
}

2
ui-ngx/src/app/modules/home/components/calculated-fields/components/propagation-configuration/propagation-configuration.component.ts

@ -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});
});
}

1
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});
});
}

2
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({

Loading…
Cancel
Save