mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Delete alerts period dropdown and to-delete count (#846)
This commit is contained in:
parent
8b993a948e
commit
ce7f2fa69b
6 changed files with 222 additions and 277 deletions
|
|
@ -323,6 +323,14 @@ function alertSeverity(v)
|
|||
return(_handleArray(severity_table, v))
|
||||
end
|
||||
|
||||
function alertSeverityRaw(sev_idx)
|
||||
sev_idx = sev_idx + 1
|
||||
if sev_idx <= #alert_level_keys then
|
||||
return alert_level_keys[sev_idx][3]
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function alertTypeLabel(v, nohtml)
|
||||
local res = _handleArray(alert_type_keys, tonumber(v))
|
||||
if res ~= nil and nohtml == true then res = noHtml(res) end
|
||||
|
|
@ -337,6 +345,14 @@ function alertType(v)
|
|||
return(_handleArray(typetable, v))
|
||||
end
|
||||
|
||||
function alertTypeRaw(alert_idx)
|
||||
alert_idx = alert_idx + 1
|
||||
if alert_idx <= #alert_type_keys then
|
||||
return alert_type_keys[alert_idx][3]
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function alertEntityLabel(v, nothml)
|
||||
local res = _handleArray(alert_entity_keys, tonumber(v))
|
||||
if res ~= nil and nohtml == true then res = noHtml(res) end
|
||||
|
|
@ -351,6 +367,14 @@ function alertEntity(v)
|
|||
return(_handleArray(typetable, v))
|
||||
end
|
||||
|
||||
function alertEntityRaw(entity_idx)
|
||||
entity_idx = entity_idx + 1
|
||||
if entity_idx <= #alert_entity_keys then
|
||||
return alert_entity_keys[entity_idx][3]
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function firstToUpper(str)
|
||||
str = tostring(str)
|
||||
return (str:gsub("^%l", string.upper))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue