Added MAC Address cache duration preference (#8684)

This commit is contained in:
Matteo Biscosi 2024-09-03 16:38:48 +02:00
parent 4d80bb1edd
commit a9ae442394
9 changed files with 34 additions and 4 deletions

View file

@ -18,6 +18,7 @@ local influxdb = require("influxdb")
local script_manager = require("script_manager")
local info = ntop.getInfo()
local auth = require "auth"
local prefs = ntop.getPrefs()
local email_peer_pattern = [[^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)$]]
@ -1348,6 +1349,15 @@ if auth.has_capability(auth.capabilities.preferences) then
min = 60,
tformat = "mhd"
})
prefsInputFieldPrefs(subpage_active.entries["mac_address_cache_duration"].title,
subpage_active.entries["mac_address_cache_duration"].description, "ntopng.prefs.",
"mac_address_cache_duration", prefs.mac_address_cache_duration or 300, "number", true, nil,
nil, {
min = 5,
tformat = "mhd"
})
print('</table>')