applications/luci_statistics: add missing translations to cbi models
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / email.lua
1 --[[
2
3 Luci configuration model for statistics - collectd email 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         translate("E-Mail Plugin Configuration"),
18         translate(
19                 "The email plugin creates a unix socket which can be used " ..
20                 "to transmit email-statistics to a running collectd daemon. " ..
21                 "This plugin is primarily intended to be used in conjunction " ..
22                 "with Mail::SpamAssasin::Plugin::Collectd but can be used in " ..
23                 "other ways as well."
24         ))
25
26 -- collectd_email config section
27 s = m:section( NamedSection, "collectd_email", "luci_statistics" )
28
29 -- collectd_email.enable
30 enable = s:option( Flag, "enable", translate("Enable this plugin") )
31 enable.default = 0
32
33 -- collectd_email.socketfile (SocketFile)
34 socketfile = s:option( Value, "SocketFile", translate("Socket file") )
35 socketfile.default = "/var/run/collect-email.sock"
36 socketfile:depends( "enable", 1 )
37
38 -- collectd_email.socketgroup (SocketGroup)
39 socketgroup = s:option( Value, "SocketGroup", translate("Socket group") )
40 socketgroup.default  = "nobody"
41 socketgroup.rmempty  = true
42 socketgroup.optional = true
43 socketgroup:depends( "enable", 1 )
44
45 -- collectd_email.socketperms (SocketPerms)
46 socketperms = s:option( Value, "SocketPerms", translate("Socket permissions") )
47 socketperms.default  = "0770"
48 socketperms.rmempty  = true
49 socketperms.optional = true
50 socketperms:depends( "enable", 1 )
51
52 -- collectd_email.maxconns (MaxConns)
53 maxconns = s:option( Value, "MaxConns", translate("Maximum allowed connections") )
54 maxconns.default   = 5
55 maxconns.isinteger = true
56 maxconns.rmempty   = true
57 maxconns.optional  = true
58 maxconns:depends( "enable", 1 )
59
60 return m