mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Add configuration for MDNS forwarder
This commit is contained in:
parent
f69a959f06
commit
7a4ea040c4
4 changed files with 35 additions and 1 deletions
|
|
@ -47,18 +47,39 @@ if table.len(_POST) > 0 then
|
|||
changed = true
|
||||
end
|
||||
|
||||
local mdns_repeater = _POST["toggle_mdns_repeater"]
|
||||
if mdns_repeater ~= nil then
|
||||
local mdns_repeater_enabled = ternary(mdns_repeater == "1", true, false)
|
||||
sys_config:setMDNSRepeaterEnabled(mdns_repeater_enabled)
|
||||
changed = true
|
||||
end
|
||||
|
||||
if changed then
|
||||
sys_config:save()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function print_page_body()
|
||||
|
||||
printPageSection(i18n("prefs.network_interfaces"))
|
||||
|
||||
local lan_recovery = sys_config:getLanRecoveryIpConfig()
|
||||
local descr = i18n("nedge.lan_recovery_ip_descr", {product=info["product"]}) .. "<br><b>" .. i18n("nedge.lan_recovery_warning") .. "</b>"
|
||||
system_setup_ui_utils.printPrivateAddressSelector(i18n("nedge.lan_recovery_ip"), descr, "lan_recovery_ip", "lan_recovery_netmask", lan_recovery.ip, true)
|
||||
|
||||
local mdns_repeater_enabled = sys_config:isMDNSRepeaterEnabled()
|
||||
prefsToggleButton(subpage_active, {
|
||||
title = i18n("prefs.toggle_mdns_repeater_title"),
|
||||
description = i18n("prefs.toggle_mdns_repeater_description"),
|
||||
content = "",
|
||||
field = "toggle_mdns_repeater",
|
||||
default = "0",
|
||||
pref = "",
|
||||
redis_prefix = "",
|
||||
default = ternary(mdns_repeater_enabled, "1", "0"),
|
||||
})
|
||||
|
||||
print('<tr><th colspan=2 style="text-align:right;">')
|
||||
if is_nedge then
|
||||
print('<button class="btn btn-danger disable-on-dirty" type="button" onclick="$(\'#factoryResetDialog\').modal(\'show\');" style="width:200px; float:left;">'..i18n("nedge.factory_reset")..'</button>')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue