* luci/statistics: complete cbi model translation
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / unixsock.lua
1 --[[
2
3 Luci configuration model for statistics - collectd unixsock 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 m = Map("luci_statistics")
17
18 -- collectd_unixsock config section
19 s = m:section( NamedSection, "collectd_unixsock", "luci_statistics" )
20
21 -- collectd_unixsock.enable
22 enable = s:option( Flag, "enable" )
23 enable.default = 0
24
25 -- collectd_unixsock.socketfile (SocketFile)
26 socketfile = s:option( Value, "SocketFile" )
27 socketfile.default = "/var/run/collect-query.socket"
28 socketfile:depends( "enable", 1 )
29
30 -- collectd_unixsock.socketgroup (SocketGroup)
31 socketgroup = s:option( Value, "SocketGroup" )
32 socketgroup.default = "nobody"
33 socketgroup.rmempty = true
34 socketgroup.optional = true
35 socketgroup:depends( "enable", 1 )
36
37 -- collectd_unixsock.socketperms (SocketPerms)
38 socketperms = s:option( Value, "SocketPerms" )
39 socketperms.default = "0770"
40 socketperms.rmempty = true
41 socketperms.optional = true
42 socketperms:depends( "enable", 1 )
43
44 return m