nbox integration cleanup

This commit is contained in:
Alfredo Cardigliano 2018-10-23 13:00:35 +02:00
parent c7846f8c4b
commit 186e7c2a4b
9 changed files with 15 additions and 395 deletions

View file

@ -690,39 +690,6 @@ end
-- ================================================================================
function printNbox()
print('<form method="post">')
print('<table class="table">')
print('<tr><th colspan=2 class="info">'..i18n("prefs.nbox_integration")..'</th></tr>')
local elementToSwitch = {"nbox_user","nbox_password"}
prefsToggleButton(subpage_active, {
field = "toggle_nbox_integration",
default = "0",
pref = "nbox_integration",
to_switch = elementToSwitch,
})
if ntop.getPref("ntopng.prefs.nbox_integration") == "1" then
showElements = true
else
showElements = false
end
prefsInputFieldPrefs(subpage_active.entries["nbox_user"].title, subpage_active.entries["nbox_user"].description, "ntopng.prefs.", "nbox_user", "nbox", nil, showElements, false)
prefsInputFieldPrefs(subpage_active.entries["nbox_password"].title, subpage_active.entries["nbox_password"].description, "ntopng.prefs.", "nbox_password", "nbox", "password", showElements, false)
print('<tr><th colspan=2 style="text-align:right;"><button type="submit" class="btn btn-primary" style="width:115px" disabled="disabled">'..i18n("save")..'</button></th></tr>')
print('</table>')
print [[<input id="csrf" name="csrf" type="hidden" value="]] print(ntop.getRandomCSRFValue()) print [[" />
</form> ]]
end
-- ================================================================================
function printNetworkDiscovery()
print('<form method="post">')
print('<table class="table">')
@ -1450,12 +1417,6 @@ if(tab == "protocols") then
printProtocolPrefs()
end
if(tab == "nbox") then
if(ntop.isPro()) then
printNbox()
end
end
if(tab == "discovery") then
printNetworkDiscovery()
end