3 Luci configuration model for statistics - collectd interface plugin configuration
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
19 m = Map("luci_statistics",
20 translate("Interface Plugin Configuration"),
22 "The interface plugin collects traffic statistics on " ..
23 "selected interfaces."
26 -- collectd_interface config section
27 s = m:section( NamedSection, "collectd_interface", "luci_statistics" )
29 -- collectd_interface.enable
30 enable = s:option( Flag, "enable", translate("Enable this plugin") )
33 -- collectd_interface.interfaces (Interface)
34 interfaces = s:option( MultiValue, "Interfaces", translate("Monitor interfaces") )
35 interfaces.widget = "select"
37 interfaces:depends( "enable", 1 )
38 for k, v in pairs(luci.sys.net.devices()) do
42 -- collectd_interface.ignoreselected (IgnoreSelected)
43 ignoreselected = s:option( Flag, "IgnoreSelected", translate("Monitor all except specified") )
44 ignoreselected.default = 0
45 ignoreselected:depends( "enable", 1 )