Some fixes for ntopng and nbox integration

This commit is contained in:
valentina 2016-03-26 17:52:25 +01:00
parent 7097baa977
commit 149cdb18c6
4 changed files with 29 additions and 14 deletions

View file

@ -99,11 +99,9 @@ if (ntop.isPro()) then
print('<tr><th colspan=2 class="info">nBox Integration</th></tr>')
local nbox_integration = ntop.getCache("ntopng.prefs.nbox_integration")
local nbox_host = ntop.getCache("ntopng.prefs.nbox_host")
local nbox_user = ntop.getCache("ntopng.prefs.nbox_user")
local nbox_password = ntop.getCache("ntopng.prefs.nbox_password")
if((nbox_integration == nil) or (nbox_integration == "")) then ntop.setCache("ntopng.prefs.nbox_integration", "0") end
if((nbox_host == nil) or (nbox_host == "")) then nbox_host = "localhost" end
if((nbox_user == nil) or (nbox_user == "")) then nbox_user = "nbox" end
if((nbox_password == nil) or (nbox_password == "")) then nbox_password = "nbox" end
@ -111,7 +109,6 @@ if (ntop.isPro()) then
"Enable sending ntopng requests (e.g., to download pcap files) to an nBox. Pcap requests are issued from the historical data browser when browsing 'Talkers' and 'Protocols'. Each request carry information on the search criteria generated by the user when drilling-down historical data. Requests are queued and pcaps become available for download from a dedicated 'Pcaps' tab once generated.",
"On", "1", "success", "Off", "0", "danger", "toggle_nbox_integration", "ntopng.prefs.nbox_integration")
if ntop.getCache("ntopng.prefs.nbox_integration") == "1" then
prefsInputField("nBox Host", "Address of the nBox host. Default: localhost", "nbox_host", nbox_host)
prefsInputField("nBox User", "User that has privileges to access the nBox. Default: nbox", "nbox_user", nbox_user)
prefsInputField("nBox Password", "Password associated to the nBox user. Default: nbox", "nbox_password", nbox_password, "password")
end