Skip to content

Commit

Permalink
[APM] Bug with Transaction Latency Threshold rule (#111541) (#111632)
Browse files Browse the repository at this point in the history
Co-authored-by: Cauê Marcondes <[email protected]>
  • Loading branch information
kibanamachine and cauemarcondes authored Sep 8, 2021
1 parent 4ef4e8a commit 7051a5e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions x-pack/plugins/apm/public/components/alerting/fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ export function EnvironmentField({
const title = i18n.translate('xpack.apm.alerting.fields.environment', {
defaultMessage: 'Environment',
});

// "1" means "All" is the only option and we should not show a select.
if (options.length === 1) {
return <EuiExpression description={title} value={ENVIRONMENT_ALL.text} />;
return (
<EuiExpression
description={title}
value={currentValue || ENVIRONMENT_ALL.text}
/>
);
}

return (
Expand Down

0 comments on commit 7051a5e

Please sign in to comment.