From a948f4c77e6f403c71b09559ceffab8fafc210d5 Mon Sep 17 00:00:00 2001 From: Boyi C Date: Tue, 26 May 2015 15:08:07 -0600 Subject: Update qos.lua to add custom QOS classes to luci droplist --- applications/luci-app-qos/luasrc/model/cbi/qos/qos.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'applications/luci-app-qos') 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 99a884f86..06b8d4e28 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")) -- cgit v1.2.3