luci-app-mwan3: add syslog rule debug option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
47cba970a5
commit
a429bb47e7
2 changed files with 26 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
local net = require "luci.model.network".init()
|
||||
|
||||
local s, m, mask, rtmon, rtlookup
|
||||
local s, m, mask, rtmon, rtlookup, logging, loglevel
|
||||
|
||||
m = Map("mwan3", translate("MWAN - Globals"))
|
||||
|
||||
|
@ -17,6 +17,27 @@ mask = s:option(
|
|||
mask.datatype = "hex(4)"
|
||||
mask.default = "0xff00"
|
||||
|
||||
logging = s:option(Flag,
|
||||
"logging",
|
||||
translate("Logging"),
|
||||
translate("Enables global firewall logging"))
|
||||
|
||||
loglevel = s:option(
|
||||
ListValue,
|
||||
"loglevel",
|
||||
translate("Loglevel"),
|
||||
translate("Firewall loglevel"))
|
||||
loglevel.default = "notice"
|
||||
loglevel:value("emerg", translate("Emergency"))
|
||||
loglevel:value("alert", translate("Alert"))
|
||||
loglevel:value("crit", translate("Critical"))
|
||||
loglevel:value("error", translate("Error"))
|
||||
loglevel:value("warning", translate("Warning"))
|
||||
loglevel:value("notice", translate("Notice"))
|
||||
loglevel:value("info", translate("Info"))
|
||||
loglevel:value("debug", translate("Debug"))
|
||||
loglevel:depends("logging", "1")
|
||||
|
||||
rtmon = s:option(
|
||||
Value,
|
||||
"rtmon_interval",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
local dsp = require "luci.dispatcher"
|
||||
|
||||
local m, mwan_rule, src_ip, src_port, dest_ip, dest_port, proto, sticky
|
||||
local timeout, ipset, policy
|
||||
local timeout, ipset, logging, policy
|
||||
|
||||
arg[1] = arg[1] or ""
|
||||
|
||||
|
@ -53,6 +53,9 @@ timeout.datatype = "range(1, 1000000)"
|
|||
ipset = mwan_rule:option(Value, "ipset", translate("IPset"),
|
||||
translate("Name of IPset rule. Requires IPset rule in /etc/dnsmasq.conf (eg \"ipset=/youtube.com/youtube\")"))
|
||||
|
||||
logging = mwan_rule:option(Flag, "logging", translate("Logging"),
|
||||
translate("Enables firewall rule logging (global mwan3 logging must also be enabled)"))
|
||||
|
||||
policy = mwan_rule:option(Value, "use_policy", translate("Policy assigned"))
|
||||
m.uci:foreach("mwan3", "policy",
|
||||
function(s)
|
||||
|
|
Loading…
Reference in a new issue