Globally reduce copyright headers
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / dns.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
2 -- Licensed to the public under the Apache License 2.0.
3
4 require("luci.sys")
5
6
7 m = Map("luci_statistics",
8         translate("DNS Plugin Configuration"),
9         translate(
10                 "The dns plugin collects detailled statistics about dns " ..
11                 "related traffic on selected interfaces."
12         ))
13
14 -- collectd_dns config section
15 s = m:section( NamedSection, "collectd_dns", "luci_statistics" )
16
17 -- collectd_dns.enable
18 enable = s:option( Flag, "enable", translate("Enable this plugin") )
19 enable.default = 0
20
21 -- collectd_dns.interfaces (Interface)
22 interfaces = s:option( MultiValue, "Interfaces", translate("Monitor interfaces") )
23 interfaces.widget = "select"
24 interfaces.size   = 5
25 interfaces:depends( "enable", 1 )
26 interfaces:value("any")
27 for k, v in pairs(luci.sys.net.devices()) do
28         interfaces:value(v)
29 end
30          
31 -- collectd_dns.ignoresources (IgnoreSource)
32 ignoresources = s:option( Value, "IgnoreSources", translate("Ignore source addresses") )
33 ignoresources.default = "127.0.0.1"
34 ignoresources:depends( "enable", 1 )
35
36 return m