change(ui) - show percentage based on trigger option

This commit is contained in:
Shekar Siri 2023-02-17 15:24:33 +01:00 committed by Taha Yassine Kraiem
parent 8ee5839c1e
commit 1518fbf594

View file

@ -131,7 +131,7 @@ function AlertListItem(props: Props) {
{' is '}
<span className="font-semibold" style={{ fontFamily: 'Menlo, Monaco, Consolas' }}>
{alert.query.operator}
{numberWithCommas(alert.query.right)} {alert.metric?.unit}
{numberWithCommas(alert.query.right)} {alert.change === 'percent' ? '%' : alert.metric?.unit}
</span>
{' over the past '}
<span className="font-semibold" style={{ fontFamily: 'Menlo, Monaco, Consolas' }}>{getThreshold(