3 Luci configuration model for statistics - collectd dns 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("DNS Plugin Configuration"),
22 "The dns plugin collects detailled statistics about dns " ..
23 "related traffic on selected interfaces."
26 -- collectd_dns config section
27 s = m:section( NamedSection, "collectd_dns", "luci_statistics" )
29 -- collectd_dns.enable
30 enable = s:option( Flag, "enable", translate("Enable this plugin") )
33 -- collectd_dns.interfaces (Interface)
34 interfaces = s:option( MultiValue, "Interfaces", translate("Monitor interfaces") )
35 interfaces.widget = "select"
37 interfaces:depends( "enable", 1 )
38 interfaces:value("any")
39 for k, v in pairs(luci.sys.net.devices()) do
43 -- collectd_dns.ignoresources (IgnoreSource)
44 ignoresources = s:option( Value, "IgnoreSources", translate("Ignore source addresses") )
45 ignoresources.default = "127.0.0.1"
46 ignoresources:depends( "enable", 1 )