mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix potential display of "0" on rule details tab
When looking at the details tab of an alert rule, the last evaluation could potentially display as `0` due to falsy checks on React rendering
This commit is contained in:
parent
a94c3d63cc
commit
9a416b8241
@ -79,12 +79,12 @@ const Details = ({ rule }: DetailsProps) => {
|
||||
{hasEvaluationDuration && (
|
||||
<>
|
||||
Last evaluation
|
||||
{evaluationTimestamp && evaluationDuration && (
|
||||
{evaluationTimestamp && evaluationDuration ? (
|
||||
<span>
|
||||
<Text color="primary">{formatDistanceToNowStrict(new Date(evaluationTimestamp))} ago</Text>, took{' '}
|
||||
<Text color="primary">{evaluationDuration}ms</Text>
|
||||
</span>
|
||||
)}
|
||||
) : null}
|
||||
</>
|
||||
)}
|
||||
</MetaText>
|
||||
|
Loading…
Reference in New Issue
Block a user