luci-app-mwan3: add dependecy to size option
[project/luci.git] / applications / luci-app-mwan3 / luasrc / model / cbi / mwan / interfaceconfig.lua
index 3a896d3..8cfeecd 100644 (file)
@@ -54,6 +54,7 @@ count:value("5")
 
 size = mwan_interface:option(Value, "size", translate("Ping size"))
 size.default = "56"
+size:depends("track_method", "ping")
 size:value("8")
 size:value("24")
 size:value("56")
@@ -171,7 +172,7 @@ metric = mwan_interface:option(DummyValue, "metric", translate("Metric"),
        translate("This displays the metric assigned to this interface in /etc/config/network"))
 metric.rawhtml = true
 function metric.cfgvalue(self, s)
-       local uci = uci.cursor(nil, "/var/state")
+       local uci = require "luci.model.uci".cursor(nil, "/var/state")
        local metric = uci:get("network", arg[1], "metric")
        if metric then
                return metric