summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-qos/luasrc/model
diff options
context:
space:
mode:
authorBoyi C <ftscby@gmail.com>2015-05-26 15:08:07 -0600
committerBoyi C <ftscby@gmail.com>2015-05-26 15:08:07 -0600
commita948f4c77e6f403c71b09559ceffab8fafc210d5 (patch)
treecdbc2f965175050086e3f187f6efbc011677b3b1 /applications/luci-app-qos/luasrc/model
parent1dada8cc4436a9cfb1a8a8e67085a7aadfec25cd (diff)
Update qos.lua to add custom QOS classes to luci droplist
Diffstat (limited to 'applications/luci-app-qos/luasrc/model')
-rw-r--r--applications/luci-app-qos/luasrc/model/cbi/qos/qos.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/applications/luci-app-qos/luasrc/model/cbi/qos/qos.lua b/applications/luci-app-qos/luasrc/model/cbi/qos/qos.lua
index 99a884f865..06b8d4e286 100644
--- a/applications/luci-app-qos/luasrc/model/cbi/qos/qos.lua
+++ b/applications/luci-app-qos/luasrc/model/cbi/qos/qos.lua
@@ -41,6 +41,16 @@ t:value("Priority", translate("priority"))
t:value("Express", translate("express"))
t:value("Normal", translate("normal"))
t:value("Bulk", translate("low"))
+
+local uci = require "luci.model.uci"
+uci.cursor():foreach("qos", "class",
+ function (section)
+ local n = section[".name"]
+ if string.sub(n,-string.len("_down"))~="_down" then
+ t:value(n)
+ end
+ end)
+
t.default = "Normal"
srch = s:option(Value, "srchost", translate("Source host"))