Merge branch 'dev' of https://github.com/ntop/ntopng into dev

This commit is contained in:
Matteo Biscosi 2024-06-26 18:43:10 +02:00
commit a0d6b6ba18
2 changed files with 13 additions and 13 deletions

View file

@ -2265,7 +2265,19 @@ if auth.has_capability(auth.capabilities.preferences) then
showNetboxConfiguration = true
end
if (_POST["toggle_netbox"]) then
showNetboxConfiguration = (_POST["toggle_netbox"] == "1")
showNetboxConfiguration = (_POST["toggle_netbox"] == "1")
if(showNetboxConfiguration == true) then
package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path
local netbox_manager = require("netbox_manager")
traceError(TRACE_NORMAL, TRACE_CONSOLE, "[NetBox] Initializing...\n")
if(netbox_manager.initialization_device_roles() == true) then
traceError(TRACE_NORMAL, TRACE_CONSOLE, "[NetBox] Initialization completed")
else
traceError(TRACE_NORMAL, TRACE_CONSOLE, "[NetBox] Initialization failed")
end
end
end
-- tprint(ntop.getPref("ntopng.prefs.toggle_netbox") .. " " .. tostring(showNetboxConfiguration))