1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
7 m = Map("luci_statistics",
8 translate("Interface Plugin Configuration"),
10 "The interface plugin collects traffic statistics on " ..
11 "selected interfaces."
14 -- collectd_interface config section
15 s = m:section( NamedSection, "collectd_interface", "luci_statistics" )
17 -- collectd_interface.enable
18 enable = s:option( Flag, "enable", translate("Enable this plugin") )
21 -- collectd_interface.interfaces (Interface)
22 interfaces = s:option( MultiValue, "Interfaces", translate("Monitor interfaces") )
23 interfaces.widget = "select"
25 interfaces:depends( "enable", 1 )
26 for k, v in pairs(luci.sys.net.devices()) do
30 -- collectd_interface.ignoreselected (IgnoreSelected)
31 ignoreselected = s:option( Flag, "IgnoreSelected", translate("Monitor all except specified") )
32 ignoreselected.default = 0
33 ignoreselected:depends( "enable", 1 )