Fix mac-based serialization key and add a preference to enabled it (disabled by default)

This commit is contained in:
emanuele-f 2019-02-22 16:01:29 +01:00
parent 98cb560083
commit 4a97017f35
14 changed files with 57 additions and 33 deletions

View file

@ -990,14 +990,24 @@ function printMisc()
-- ######################
if(haveAdminPrivileges()) then
print('<tr><th colspan=2 class="info">'..i18n("prefs.host_mask")..'</th></tr>')
print('<tr><th colspan=2 class="info">'..i18n("hosts")..'</th></tr>')
local h_labels = {i18n("prefs.no_host_mask"), i18n("prefs.local_host_mask"), i18n("prefs.remote_host_mask")}
local h_values = {"0", "1", "2"}
multipleTableButtonPrefs(subpage_active.entries["toggle_host_mask"].title,
subpage_active.entries["toggle_host_mask"].description,
h_labels, h_values, "0", "primary", "toggle_host_mask", "ntopng.prefs.host_mask")
multipleTableButtonPrefs(subpage_active.entries["toggle_host_tskey"].title,
subpage_active.entries["toggle_host_tskey"].description,
{i18n("ip_address"), i18n("mac_address")}, {"0", "1"},
"0",
"primary",
"serialize_local_broadcast_hosts_as_macs",
"ntopng.prefs.serialize_local_broadcast_hosts_as_macs", nil,
elementToSwitch, showElementArray, javascriptAfterSwitch, showElement)
end
-- #####################