diff options
Diffstat (limited to 'applications/luci-qos/luasrc/model/cbi/qos/qos.lua')
-rw-r--r-- | applications/luci-qos/luasrc/model/cbi/qos/qos.lua | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/applications/luci-qos/luasrc/model/cbi/qos/qos.lua b/applications/luci-qos/luasrc/model/cbi/qos/qos.lua index ea535cea2..0bb559ede 100644 --- a/applications/luci-qos/luasrc/model/cbi/qos/qos.lua +++ b/applications/luci-qos/luasrc/model/cbi/qos/qos.lua @@ -34,15 +34,26 @@ s.anonymous = true s.addremove = true t = s:option(ListValue, "target") -t:value("Priority") -t:value("Express") -t:value("Normal") -t:value("Bulk") +t:value("Priority", translate("qos_priority")) +t:value("Express", translate("qos_express")) +t:value("Normal", translate("qos_normal")) +t:value("Bulk", translate("qos_bulk")) t.default = "Normal" s:option(Value, "srchost").optional = true s:option(Value, "dsthost").optional = true -s:option(Value, "layer7", "Layer 7").optional = true + +l7 = s:option(ListValue, "layer7", translate("service")) +l7.optional = true +l7:value("") +local pats = luci.fs.dir("/etc/l7-protocols") +if pats then + for i,f in ipairs(pats) do + if f:sub(-4) == ".pat" then + l7:value(f:sub(1, #f-4)) + end + end +end p2p = s:option(ListValue, "ipp2p", "P2P") p2p:value("") |