Browse Source

UI: Fixed cf pages minor bugs and change default color for operation for alarm rule

pull/14784/head
ArtemDzhereleiko 9 months ago
parent
commit
37e23294d4
  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. 2
      ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts
  4. 2
      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);
}
}
}

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

@ -121,7 +121,7 @@ export class CalculatedFieldComponent extends EntityComponent<CalculatedFieldsTa
updateForm(entity: CalculatedFieldInfo) {
const { configuration = {} as CalculatedFieldConfiguration, type = CalculatedFieldType.SIMPLE, debugSettings = { failuresEnabled: true, allEnabled: true }, entityId = this.entityId, ...value } = entity ?? {};
const preparedConfig = this.cfFormService.prepareConfig(configuration);
this.entityForm.patchValue({ type }, {emitEvent: false, onlySelf: true});
this.entityForm.patchValue({ type }, {emitEvent: true, onlySelf: true});
setTimeout(() => {
this.entityForm.patchValue({ configuration: preparedConfig, debugSettings, entityId, ...value }, {emitEvent: false});
});

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

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

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