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
16 m = Map("luci_statistics", "Interface Plugin",
17 [[Das Interface-Plugin sammelt Informationen zum Netzwerkverkehr auf den einzelnen Schnittstellen.]])
19 -- collectd_interface config section
20 s = m:section( NamedSection, "collectd_interface", "luci_statistics", "Pluginkonfiguration" )
22 -- collectd_interface.enable
23 enable = s:option( Flag, "enable", "Plugin aktivieren" )
26 -- collectd_interface.interfaces (Interface)
27 interfaces = s:option( MultiValue, "Interfaces", "Überwachte Schnittstellen", "mehrere Einträge mit Strg selektieren" )
28 interfaces.widget = "select"
29 interfaces:depends( "enable", 1 )
30 for k, v in pairs(ffluci.model.uci.sections("network")) do
31 if v[".type"] == "interface" and k ~= "loopback" then
36 -- collectd_interface.ignoreselected (IgnoreSelected)
37 ignoreselected = s:option( Flag, "IgnoreSelected", "Alle Schnittstellen außer ausgewählte überwachen" )
38 ignoreselected.default = 0
39 ignoreselected:depends( "enable", 1 )