Fix the custom threshold flyout validation style (#170858)

Closes #166275

## Summary

This PR fixes the custom threshold flyout validation style.


|Before|After|
|---|---|

|![image](f16cbd67-d177-446e-9612-61fa7eaf1549)|
This commit is contained in:
Maryam Saeidi 2023-11-09 10:21:15 +01:00 committed by GitHub
parent 4258d13bdf
commit 6c10e7cd03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -167,7 +167,6 @@ export function CustomEquationEditor({
{ defaultMessage: 'Equation and threshold' }
)}
error={[errors.equation]}
isInvalid={errors.equation != null}
>
<>
<EuiSpacer size="xs" />
@ -182,6 +181,7 @@ export function CustomEquationEditor({
onClick={() => {
setCustomEqPopoverOpen(true);
}}
isInvalid={errors.equation != null}
/>
</>
</EuiFormRow>

View file

@ -126,7 +126,6 @@ export function MetricRowWithAgg({
'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.aggregationLabel',
{ defaultMessage: 'Aggregation {name}', values: { name } }
)}
isInvalid={aggType !== Aggregators.COUNT && !field}
>
<EuiExpression
data-test-subj="aggregationName"
@ -139,6 +138,7 @@ export function MetricRowWithAgg({
onClick={() => {
setAggTypePopoverOpen(true);
}}
isInvalid={aggType !== Aggregators.COUNT && !field}
/>
</EuiFormRow>
}
@ -167,7 +167,6 @@ export function MetricRowWithAgg({
'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.aggregationType',
{ defaultMessage: 'Aggregation type' }
)}
isInvalid={isAggInvalid}
>
<EuiSelect
data-test-subj="aggregationTypeSelect"
@ -183,6 +182,7 @@ export function MetricRowWithAgg({
value,
};
})}
isInvalid={isAggInvalid}
/>
</EuiFormRow>
</EuiFlexItem>
@ -208,7 +208,6 @@ export function MetricRowWithAgg({
'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.fieldLabel',
{ defaultMessage: 'Field name' }
)}
isInvalid={isFieldInvalid}
>
<EuiComboBox
fullWidth