Fixes wrongly formatted drops alert description

This commit is contained in:
Matteo Biscosi 2021-03-23 13:26:44 +01:00
parent 5df71d236e
commit bee49df334
2 changed files with 4 additions and 3 deletions

View file

@ -53,8 +53,9 @@ function alert_too_many_drops.format(ifid, alert, alert_type_params)
local alert_consts = require("alert_consts")
local entity = alert_consts.formatAlertEntity(ifid, alert_consts.alertEntityRaw(alert["alert_entity"]), alert["alert_entity_val"])
local max_drop_perc = alert_type_params.edge or 0
return(i18n("alert_messages.too_many_drops", {iface = entity, max_drops = max_drop_perc}))
local perc_drops = string.format("%.1f", alert_type_params.drop_perc)
return(i18n("alert_messages.too_many_drops", {iface = entity, perc_drops = perc_drops, max_drops = max_drop_perc}))
end
-- #######################################################