mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 10:41:34 +00:00
Fixes and cleanup for low goodput user script
This commit is contained in:
parent
17266b71a6
commit
658b48994d
5 changed files with 13 additions and 75 deletions
|
|
@ -10,7 +10,11 @@ local format_utils = require("format_utils")
|
|||
-- #################################################################
|
||||
|
||||
local function formatFlowLowGoodput(info)
|
||||
return i18n("flow_details.flow_low_goodput", { ratio = format_utils.round(info.goodput_ratio,2) })
|
||||
if info and info.goodput_ratio then
|
||||
return i18n("flow_details.flow_low_goodput", { ratio = format_utils.round(info.goodput_ratio, 2) })
|
||||
end
|
||||
|
||||
return(i18n("alerts_dashboard.flow_low_goodput"))
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
|
@ -18,6 +22,6 @@ end
|
|||
return {
|
||||
status_key = status_keys.ntopng.status_low_goodput,
|
||||
alert_type = alert_consts.alert_types.alert_flow_low_goodput,
|
||||
i18n_title = "flow_details.flow_low_goodput",
|
||||
i18n_title = "alerts_dashboard.flow_low_goodput",
|
||||
i18n_description = formatFlowLowGoodput
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue