diff --git a/scripts/locales/en.lua b/scripts/locales/en.lua
index 7c70801a189c..68c77aba5c35 100644
--- a/scripts/locales/en.lua
+++ b/scripts/locales/en.lua
@@ -7165,6 +7165,8 @@ local lang = {
["toggle_snmp_rrds_title"] = "SNMP Devices Timeseries",
["toggle_snmp_trap_description"] = "Toggle SNMP Trap collection on port UDP:162.",
["toggle_snmp_trap_title"] = "SNMP Trap Collection",
+ ["toggle_snmp_excluded_from_usage_title"] = "SNMP Exclude New Interfaces from Usage",
+ ["toggle_snmp_excluded_from_usage_description"] = "By default all the new interfaces/devices are going to be added in the Usage Page. By enabling this preference instead, all the new interfaces/devices are going to be excluded from that page and to re-include them the SNMP interface configuration needs to be changed.",
["toggle_src_with_post_nat_src_description"] = "Replace IPv4 source addresses (%%IPV4_SRC_ADDR) and ports (%%L4_SRC_PORT) with their post-nat values (%%POST_NAT_SRC_IPV4_ADDR and %%POST_NAT_SRC_TRANSPORT_PORT).",
["toggle_src_with_post_nat_src_title"] = "Use Post-Nat Source IPv4 Addresses and Ports",
["toggle_system_probes_timeseries_description"] = "Toggle the creation of timeseries for system probes such as the Active Monitoring and the Redis monitor.",
diff --git a/scripts/lua/admin/prefs.lua b/scripts/lua/admin/prefs.lua
index e6951a24ad3c..d6881a487b77 100644
--- a/scripts/lua/admin/prefs.lua
+++ b/scripts/lua/admin/prefs.lua
@@ -53,7 +53,7 @@ end
local function end_table()
print(
'
')
+ i18n("save") .. '')
print [[')
print('
' .. i18n("prefs.zmq_interfaces") ..
- '
')
+ '')
prefsInputFieldPrefs(subpage_active.entries["ignored_interfaces"].title,
subpage_active.entries["ignored_interfaces"].description, "ntopng.prefs.", "ignored_interfaces", "", false,
@@ -276,7 +275,7 @@ if auth.has_capability(auth.capabilities.preferences) then
print(
'
')
+ i18n("active_monitoring_stats.active_monitoring") .. '')
prefsToggleButton(subpage_active, {
field = "toggle_active_monitoring",
@@ -299,22 +298,22 @@ if auth.has_capability(auth.capabilities.preferences) then
print(
'
')
+ i18n("save") .. '')
print('
')
print [[
]]
-
end
+
function printAlerts()
print(']]
-
end
-- ================================================================================
local function printAuthDuration()
print('
' .. i18n("prefs.authentication_duration") ..
- '
')
+ '')
prefsInputFieldPrefs(subpage_active.entries["authentication_duration"].title,
subpage_active.entries["authentication_duration"].description, "ntopng.prefs.", "auth_session_duration",
prefs.auth_session_duration, "number", true, nil, nil, {
- min = 60 --[[ 1 minute --]] ,
- max = 86400 * 7 --[[ 7 days --]] ,
+ min = 60 --[[ 1 minute --]],
+ max = 86400 * 7 --[[ 7 days --]],
tformat = "mhd"
})
@@ -821,7 +816,6 @@ if auth.has_capability(auth.capabilities.preferences) then
default = "0",
pref = "auth_session_midnight_expiration"
})
-
end
-- ================================================================================
@@ -832,11 +826,11 @@ if auth.has_capability(auth.capabilities.preferences) then
end
print('
' .. i18n("prefs.ldap_authentication") ..
- '
')
+ '')
- local elementToSwitch = {"row_multiple_ldap_account_type", "row_toggle_ldap_anonymous_bind", "server",
- "bind_dn", "bind_pwd", "ldap_server_address", "search_path", "user_group",
- "admin_group", "row_toggle_ldap_referrals"}
+ local elementToSwitch = { "row_multiple_ldap_account_type", "row_toggle_ldap_anonymous_bind", "server",
+ "bind_dn", "bind_pwd", "ldap_server_address", "search_path", "user_group",
+ "admin_group", "row_toggle_ldap_referrals" }
prefsToggleButton(subpage_active, {
field = auth_toggles.ldap,
@@ -848,26 +842,26 @@ if auth.has_capability(auth.capabilities.preferences) then
-- enabled when both "host cache" and "cache" are enabled).
-- The following inputs will be shown/hidden when this preference changes.
nested_to_switch = { -- input: the input ID to toggle (e.g. the "local hosts cache")
- -- parent: the parent of the input which affects the input logic (e.g. "host cache")
- -- parent_enabled_value: the parent input value that should make the child input visible
- -- pref_enabled_value: this preference value that should make the child input visible (e.g. "1" when "cache" is enabled)
- {
- input = "bind_dn",
- parent = "input-toggle_ldap_anonymous_bind",
- parent_enabled_value = "0",
- pref_enabled_value = "1"
- }, {
+ -- parent: the parent of the input which affects the input logic (e.g. "host cache")
+ -- parent_enabled_value: the parent input value that should make the child input visible
+ -- pref_enabled_value: this preference value that should make the child input visible (e.g. "1" when "cache" is enabled)
+ {
+ input = "bind_dn",
+ parent = "input-toggle_ldap_anonymous_bind",
+ parent_enabled_value = "0",
+ pref_enabled_value = "1"
+ }, {
input = "bind_pwd",
parent = "input-toggle_ldap_anonymous_bind",
parent_enabled_value = "0",
pref_enabled_value = "1"
- }}
+ } }
})
local showElements = (ntop.getPref("ntopng.prefs.ldap.auth_enabled") == "1")
- local labels_account = {i18n("prefs.posix"), i18n("prefs.samaccount")}
- local values_account = {"posix", "samaccount"}
+ local labels_account = { i18n("prefs.posix"), i18n("prefs.samaccount") }
+ local values_account = { "posix", "samaccount" }
multipleTableButtonPrefs(subpage_active.entries["multiple_ldap_account_type"].title,
subpage_active.entries["multiple_ldap_account_type"].description, labels_account, values_account, "posix",
"primary", "multiple_ldap_account_type", "ntopng.prefs.ldap.account_type", nil, nil, nil, nil, showElements)
@@ -883,7 +877,7 @@ if auth.has_capability(auth.capabilities.preferences) then
}
})
- local elementToSwitchBind = {"bind_dn", "bind_pwd"}
+ local elementToSwitchBind = { "bind_dn", "bind_pwd" }
prefsToggleButton(subpage_active, {
field = "toggle_ldap_anonymous_bind",
default = "1",
@@ -958,13 +952,13 @@ if auth.has_capability(auth.capabilities.preferences) then
end
print('
' .. i18n("prefs.radius_auth") ..
- '
')
+ '')
-- RADIUS GUI authentication
- local elementToSwitch = {"row_toggle_radius_accounting", "row_toggle_radius_external_auth_for_local_users",
- "radius_admin_group", "radius_unpriv_capabilties_group", "radius_server_address",
- "radius_acct_server_address", "radius_secret", "row_radius_auth_proto"}
+ local elementToSwitch = { "row_toggle_radius_accounting", "row_toggle_radius_external_auth_for_local_users",
+ "radius_admin_group", "radius_unpriv_capabilties_group", "radius_server_address",
+ "radius_acct_server_address", "radius_secret", "row_radius_auth_proto" }
prefsToggleButton(subpage_active, {
field = auth_toggles.radius,
@@ -998,14 +992,14 @@ if auth.has_capability(auth.capabilities.preferences) then
}
})
- local labels_auth_protocols = {i18n("prefs.pap"), i18n("prefs.chap")}
- local values_auth_protocols = {"pap", "chap"}
+ local labels_auth_protocols = { i18n("prefs.pap"), i18n("prefs.chap") }
+ local values_auth_protocols = { "pap", "chap" }
multipleTableButtonPrefs(subpage_active.entries["radius_auth_proto"].title,
subpage_active.entries["radius_auth_proto"].description, labels_auth_protocols, values_auth_protocols,
"pap", "primary", "radius_auth_proto", "ntopng.prefs.radius.radius_auth_proto", nil, nil, nil, nil,
showElements)
- local groupsElements = {"radius_admin_group", "radius_unpriv_capabilties_group"}
+ local groupsElements = { "radius_admin_group", "radius_unpriv_capabilties_group" }
local showGroupsElements = (ntop.getPref("ntopng.prefs.radius.external_auth_for_local_users_enabled") ~= "1")
prefsToggleButton(subpage_active, {
field = "toggle_radius_external_auth_for_local_users",
@@ -1036,7 +1030,7 @@ if auth.has_capability(auth.capabilities.preferences) then
}
})
- local accountingElements = {"radius_acct_server_address"}
+ local accountingElements = { "radius_acct_server_address" }
prefsToggleButton(subpage_active, {
field = "toggle_radius_accounting",
@@ -1064,9 +1058,9 @@ if auth.has_capability(auth.capabilities.preferences) then
local function printHttpAuth()
print('
' .. i18n("prefs.http_auth") ..
- '
')
+ '')
- local elementToSwitch = {"http_auth_url"}
+ local elementToSwitch = { "http_auth_url" }
prefsToggleButton(subpage_active, {
field = auth_toggles.http,
@@ -1079,7 +1073,7 @@ if auth.has_capability(auth.capabilities.preferences) then
prefsInputFieldPrefs(subpage_active.entries["http_auth_server"].title,
subpage_active.entries["http_auth_server"].description, "ntopng.prefs.http_authenticator", "http_auth_url",
- "", nil, showElements, true, true --[[ allowUrls ]] , {
+ "", nil, showElements, true, true --[[ allowUrls ]], {
attributes = {
spellcheck = "false",
maxlength = 255,
@@ -1093,7 +1087,7 @@ if auth.has_capability(auth.capabilities.preferences) then
prefsInputFieldPrefs(subpage_active.entries["http_auth_server"].title,
subpage_active.entries["http_auth_server"].description,
"ntopng.prefs.http_authenticator.log_positive_event_enabled", "http_auth_url", "", nil, showElements, true,
- true --[[ allowUrls ]] , {
+ true --[[ allowUrls ]], {
attributes = {
spellcheck = "false",
maxlength = 255,
@@ -1107,7 +1101,7 @@ if auth.has_capability(auth.capabilities.preferences) then
local function printLocalAuth()
print('
' .. i18n("prefs.local_auth") ..
- '
')
+ '')
prefsToggleButton(subpage_active, {
field = auth_toggles["local"],
@@ -1128,7 +1122,7 @@ if auth.has_capability(auth.capabilities.preferences) then
-- Note: order must correspond to evaluation order in Ntop.cpp
print('
' .. i18n("prefs.client_x509_auth") ..
- '
')
+ '')
prefsToggleButton(subpage_active, {
field = "toggle_client_x509_auth",
default = "0",
@@ -1160,7 +1154,7 @@ if auth.has_capability(auth.capabilities.preferences) then
print(
'
')
+ '')
prefsToggleButton(subpage_active, {
field = "toggle_local_host_cache_enabled",
default = "1",
pref = "is_local_host_cache_enabled",
- to_switch = {"local_host_cache_duration", "row_toggle_active_local_host_cache_enabled",
- "active_local_host_cache_interval"},
+ to_switch = { "local_host_cache_duration", "row_toggle_active_local_host_cache_enabled",
+ "active_local_host_cache_interval" },
-- Similar to "to_switch" but for nested items (e.g. "local hosts cache" only
-- enabled when both "host cache" and "cache" are enabled).
-- The following inputs will be shown/hidden when this preference changes.
nested_to_switch = { -- input: the input ID to toggle (e.g. the "local hosts cache")
- -- parent: the parent of the input which affects the input logic (e.g. "host cache")
- -- parent_enabled_value: the parent input value that should make the child input visible
- -- pref_enabled_value: this preference value that should make the child input visible (e.g. "1" when "cache" is enabled)
- {
- input = "active_local_host_cache_interval",
- parent = "input-toggle_active_local_host_cache_enabled",
- parent_enabled_value = "1",
- pref_enabled_value = "1"
- }}
+ -- parent: the parent of the input which affects the input logic (e.g. "host cache")
+ -- parent_enabled_value: the parent input value that should make the child input visible
+ -- pref_enabled_value: this preference value that should make the child input visible (e.g. "1" when "cache" is enabled)
+ {
+ input = "active_local_host_cache_interval",
+ parent = "input-toggle_active_local_host_cache_enabled",
+ parent_enabled_value = "1",
+ pref_enabled_value = "1"
+ } }
})
local showLocalHostCacheInterval = false
@@ -1368,7 +1361,7 @@ if auth.has_capability(auth.capabilities.preferences) then
field = "toggle_active_local_host_cache_enabled",
default = "0",
pref = "is_active_local_host_cache_enabled",
- to_switch = {"active_local_host_cache_interval"}
+ to_switch = { "active_local_host_cache_interval" }
})
local showActiveLocalHostCacheInterval = false
@@ -1395,7 +1388,7 @@ if auth.has_capability(auth.capabilities.preferences) then
print('
')
print('
' .. i18n("prefs.idle_timeout_settings") ..
- '
')
+ '')
prefsInputFieldPrefs(subpage_active.entries["flow_max_idle"].title,
subpage_active.entries["flow_max_idle"].description, "ntopng.prefs.", "flow_max_idle", prefs.flow_max_idle,
@@ -1426,7 +1419,7 @@ if auth.has_capability(auth.capabilities.preferences) then
print(
'
')
+ i18n("save") .. '')
print('
')
print [[
' .. i18n('prefs.timeseries_database') ..
- '
')
+ '')
end
- local elementToSwitch = {"ts_post_data_url", "influx_dbname", "influx_retention", "row_toggle_influx_auth",
- "influx_username", "influx_password", "row_ts_high_resolution"}
- local showElementArray = {false, true, false}
+ local elementToSwitch = { "ts_post_data_url", "influx_dbname", "influx_retention", "row_toggle_influx_auth",
+ "influx_username", "influx_password", "row_ts_high_resolution" }
+ local showElementArray = { false, true, false }
local active_driver = "rrd"
local influx_active = false
@@ -1492,25 +1485,25 @@ if auth.has_capability(auth.capabilities.preferences) then
-- enabled when both "host cache" and "cache" are enabled).
-- The following inputs will be shown/hidden when this preference changes.
local nested_to_switch = { -- input: the input ID to toggle (e.g. the "local hosts cache")
- -- parent: the parent of the input which affects the input logic (e.g. "host cache")
- -- parent_enabled_value: the parent input value that should make the child input visible
- -- pref_enabled_value: this preference value that should make the child input visible (e.g. "1" when "cache" is enabled)
- {
- input = "influx_username",
- parent = "input-toggle_influx_auth",
- parent_enabled_value = "1",
- pref_enabled_value = "influxdb"
- }, {
+ -- parent: the parent of the input which affects the input logic (e.g. "host cache")
+ -- parent_enabled_value: the parent input value that should make the child input visible
+ -- pref_enabled_value: this preference value that should make the child input visible (e.g. "1" when "cache" is enabled)
+ {
+ input = "influx_username",
+ parent = "input-toggle_influx_auth",
+ parent_enabled_value = "1",
+ pref_enabled_value = "influxdb"
+ }, {
input = "influx_password",
parent = "input-toggle_influx_auth",
parent_enabled_value = "1",
pref_enabled_value = "influxdb"
- }}
+ } }
multipleTableButtonPrefs(subpage_active.entries["multiple_timeseries_database"].title,
- subpage_active.entries["multiple_timeseries_database"].description, {"RRD", "InfluxDB 1.x/2.x"},
- {"rrd", "influxdb"}, "rrd", "primary", "timeseries_driver", "ntopng.prefs.timeseries_driver", nil,
- elementToSwitch, showElementArray, nested_to_switch, true --[[show]] )
+ subpage_active.entries["multiple_timeseries_database"].description, { "RRD", "InfluxDB 1.x/2.x" },
+ { "rrd", "influxdb" }, "rrd", "primary", "timeseries_driver", "ntopng.prefs.timeseries_driver", nil,
+ elementToSwitch, showElementArray, nested_to_switch, true --[[show]])
active_driver = ntop.getPref("ntopng.prefs.timeseries_driver")
influx_active = (active_driver == "influxdb")
@@ -1540,7 +1533,7 @@ if auth.has_capability(auth.capabilities.preferences) then
field = "toggle_influx_auth",
default = "0",
pref = "influx_auth_enabled",
- to_switch = {"influx_username", "influx_password"},
+ to_switch = { "influx_username", "influx_password" },
hidden = not influx_active
})
@@ -1564,15 +1557,16 @@ if auth.has_capability(auth.capabilities.preferences) then
pattern = "[^\\s]+"
})
- local resolutions_labels = {"1m", "5m"}
- local resolutions_values = {"60", "300"}
+ local resolutions_labels = { "1m", "5m" }
+ local resolutions_values = { "60", "300" }
multipleTableButtonPrefs(subpage_active.entries["timeseries_resolution_resolution"].title,
subpage_active.entries["timeseries_resolution_resolution"].description .. " " .. i18n("notes") ..
- [[:
')
+ '')
prefsToggleButton(subpage_active, {
field = "toggle_system_probes_timeseries",
@@ -1675,18 +1669,18 @@ if auth.has_capability(auth.capabilities.preferences) then
if ntop.isPro() then
print('
' .. i18n('prefs.exporter_timeseries') ..
- '
')
+ '')
prefsToggleButton(subpage_active, {
field = "toggle_flow_rrds",
default = "0",
pref = "flow_device_port_rrd_creation",
disabled = not info["version.enterprise_edition"],
- to_switch = {"row_exporters_ts_resolution"}
+ to_switch = { "row_exporters_ts_resolution" }
})
- local resolutions_labels = {"1m", "5m"}
- local resolutions_values = {"60", "300"}
+ local resolutions_labels = { "1m", "5m" }
+ local resolutions_values = { "60", "300" }
multipleTableButtonPrefs(subpage_active.entries["toggle_flow_rrds_resolution"].title,
subpage_active.entries["toggle_flow_rrds_resolution"].description, resolutions_labels,
@@ -1702,7 +1696,7 @@ if auth.has_capability(auth.capabilities.preferences) then
end
print('
' .. i18n('prefs.other_timeseries') ..
- '
')
+ '')
if ntop.isPro() then
prefsToggleButton(subpage_active, {
@@ -1822,7 +1816,7 @@ if auth.has_capability(auth.capabilities.preferences) then
end
print(
'