Generate alert when interface drops exceed a given threshold and fix alerts invalid cache

This commit is contained in:
emanuele-f 2018-03-07 15:11:50 +01:00
parent 8a88572e21
commit b2082b7788
8 changed files with 150 additions and 38 deletions

View file

@ -549,6 +549,8 @@ alert_type_keys = {
{ "<i class='fa fa-sign-in'></i> " .. i18n("alerts_dashboard.host_pool_connection"), 12, "host_pool_connection" },
{ "<i class='fa fa-sign-out'></i> " .. i18n("alerts_dashboard.host_pool_disconnection"), 13, "host_pool_disconnection" },
{ "<i class='fa fa-thermometer-full'></i> " .. i18n("alerts_dashboard.quota_exceeded"), 14, "quota_exceeded" },
{ "<i class='fa fa-cog'></i> " .. i18n("alerts_dashboard.misconfigured_app"), 15, "misconfigured_app" },
{ "<i class='fa fa-tint'></i> " .. i18n("alerts_dashboard.too_many_drops"), 16, "too_many_drops" },
}
local alert_entity_keys = {
@ -649,7 +651,7 @@ function alertLevel(v)
end
function alertTypeRaw(alert_idx)
alert_idx = alert_idx + 1
alert_idx = alert_idx + 2 -- -1 and 0
if alert_idx <= #alert_type_keys then
return alert_type_keys[alert_idx][3]
end