Added netbox functions

This commit is contained in:
Matteo Biscosi 2024-06-21 14:48:25 +02:00
parent 4fbe62a733
commit f71507f7ef
8 changed files with 49 additions and 25 deletions

View file

@ -827,3 +827,24 @@ end
function prefsSkipRedis(skip)
skip_redis = skip
end
function isNetBoxEnabled()
if not ntop.isEnterpriseXL() then
return false
end
return (ntop.getPref("ntopng.prefs.toggle_netbox") == "1")
end
function getNetBoxURL()
if not ntop.isEnterpriseXL() or not ntop.getPref("ntopng.prefs.toggle_netbox") == "1" then
return ""
end
return ntop.getPref("ntopng.prefs.netbox_activation_url")
end
function getNetBoxToken()
if not ntop.isEnterpriseXL() or not ntop.getPref("ntopng.prefs.toggle_netbox") == "1" then
return ""
end
return ntop.getPref("ntopng.prefs.netbox_personal_access_token")
end