mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Show an alert in the GUI when Flow Dump (e.g. nIndex) initialization fails
This commit is contained in:
parent
875e4febc6
commit
161535700d
3 changed files with 35 additions and 3 deletions
|
|
@ -86,6 +86,14 @@ end
|
|||
|
||||
-- ##################################################################
|
||||
|
||||
local function create_flow_dump_alert_notification()
|
||||
local title = i18n("flow_dump_not_working_title")
|
||||
local description = i18n("flow_dump_not_working", {icon = "fas fa-external-link-alt"})
|
||||
return alert_notification:create("flow_dump_alert", title, description, "warning")
|
||||
end
|
||||
|
||||
-- ##################################################################
|
||||
|
||||
--- Create an instance for the geoip alert notification
|
||||
--- if the user doesn't have geoIP installed
|
||||
--- @param container table The table where the notification will be inserted
|
||||
|
|
@ -183,5 +191,20 @@ end
|
|||
|
||||
-- ###############################################################
|
||||
|
||||
--- Create an instance for the nIndex alert notification
|
||||
--- if nIndex is not able to start/run/dump
|
||||
--- @param container table The table where the notification will be inserted
|
||||
function defined_alert_notifications.flow_dump(container)
|
||||
if isAdministrator() and
|
||||
prefs.is_dump_flows_enabled and
|
||||
prefs.is_dump_flows_runtime_enabled and
|
||||
not interface.isFlowDumpDisabled and
|
||||
not interface.isFlowDumpRunning then
|
||||
table.insert(container, create_flow_dump_alert_notification())
|
||||
end
|
||||
end
|
||||
|
||||
-- ###############################################################
|
||||
|
||||
return defined_alert_notifications
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue