Skip to content

Commit

Permalink
Fix the anomaly info label for singular number (#44813) (#44859)
Browse files Browse the repository at this point in the history
Backports the following commits to 7.4:
 - Fix the anomaly info label for singular number (#44813)
  • Loading branch information
weltenwort authored Sep 5, 2019
1 parent 542e322 commit 6ca564a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ export const AnalysisResultsContent = ({
<span>
<FormattedMessage
id="xpack.infra.logs.analysis.anomaliesDetectedText"
defaultMessage="Detected {formattedNumber} anomalies"
defaultMessage="Detected {formattedNumber} {number, plural, one {anomaly} other {anomalies}}"
values={{
formattedNumber:
anomaliesDetected === 0 ? (
<EuiBadge color="default">0</EuiBadge>
) : (
<EuiBadge color="warning">{anomaliesDetected}</EuiBadge>
),
formattedNumber: (
<EuiBadge color={anomaliesDetected === 0 ? 'default' : 'warning'}>
{anomaliesDetected}
</EuiBadge>
),
number: anomaliesDetected,
}}
/>
</span>
Expand Down

0 comments on commit 6ca564a

Please sign in to comment.