mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Hide alerts page when no alerts are available
This commit is contained in:
parent
204f7fd145
commit
cc22879c85
2 changed files with 17 additions and 1 deletions
|
|
@ -211,4 +211,20 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function system_scripts.hasAlerts(options)
|
||||
local opts = table.merge(options, {ifid = getSystemInterfaceId()})
|
||||
local old_iface = iface
|
||||
local rv
|
||||
interface.select(getSystemInterfaceId())
|
||||
|
||||
rv = (areAlertsEnabled() and
|
||||
(getNumAlerts("historical", getTabParameters(opts, "historical")) > 0) or
|
||||
(getNumAlerts("engaged", getTabParameters(opts, "engaged")) > 0))
|
||||
|
||||
interface.select(old_iface)
|
||||
return(rv)
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
return system_scripts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue