* luci/i18n/portuguese_brazilian: core translation fixes
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / dns.lua
1 --[[
2
3 Luci configuration model for statistics - collectd dns plugin configuration
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
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
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 ]]--
15
16 require("luci.sys")
17
18
19 m = Map("luci_statistics")
20
21 -- collectd_dns config section
22 s = m:section( NamedSection, "collectd_dns", "luci_statistics" )
23
24 -- collectd_dns.enable
25 enable = s:option( Flag, "enable" )
26 enable.default = 0
27
28 -- collectd_dns.interfaces (Interface)
29 interfaces = s:option( MultiValue, "Interfaces" )
30 interfaces.widget = "select"
31 interfaces.size = 5
32 interfaces:depends( "enable", 1 )
33 interfaces:value("any")
34 for k, v in pairs(luci.sys.net.devices()) do
35 interfaces:value(v)
36 end
37
38 -- collectd_dns.ignoresources (IgnoreSource)
39 ignoresources = s:option( Value, "IgnoreSources" )
40 ignoresources.default = "127.0.0.1"
41 ignoresources:depends( "enable", 1 )
42
43 return m