1 -- ------ extra functions ------ --
3 function cbi_add_interface(field)
4 uci.cursor():foreach("mwan3", "interface",
6 field:value(section[".name"])
11 -- ------ member configuration ------ --
13 dsp = require "luci.dispatcher"
17 m5 = Map("mwan3", translatef("MWAN Member Configuration - %s", arg[1]))
18 m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "member")
21 mwan_member = m5:section(NamedSection, arg[1], "member", "")
22 mwan_member.addremove = false
23 mwan_member.dynamic = false
26 interface = mwan_member:option(Value, "interface", translate("Interface"))
27 cbi_add_interface(interface)
29 metric = mwan_member:option(Value, "metric", translate("Metric"),
30 translate("Acceptable values: 1-1000. Defaults to 1 if not set"))
31 metric.datatype = "range(1, 1000)"
33 weight = mwan_member:option(Value, "weight", translate("Weight"),
34 translate("Acceptable values: 1-1000. Defaults to 1 if not set"))
35 weight.datatype = "range(1, 1000)"
38 -- ------ currently configured interfaces ------ --
40 mwan_interface = m5:section(TypedSection, "interface", translate("Currently Configured Interfaces"))
41 mwan_interface.addremove = false
42 mwan_interface.dynamic = false
43 mwan_interface.sortable = false
44 mwan_interface.template = "cbi/tblsection"