+-- Copyright 2014 Aedan Renner <chipdankly@gmail.com>
+-- Copyright 2018 Florian Eckert <fe@dev.tdt.de>
+-- Licensed to the public under the GNU General Public License v2.
+
dsp = require "luci.dispatcher"
arg[1] = arg[1] or ""
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")
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