applications/luci-statistics: fix translations of cbi models and controller
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / tcpconns.lua
1 --[[
2
3 Luci configuration model for statistics - collectd tcpconns 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("TCPConns Plugin Configuration"),
18 translate(
19 "The tcpconns plugin collects informations about open tcp " ..
20 "connections on selected ports."
21 ))
22
23 -- collectd_tcpconns config section
24 s = m:section( NamedSection, "collectd_tcpconns", "luci_statistics" )
25
26 -- collectd_tcpconns.enable
27 enable = s:option( Flag, "enable", translate("Enable this plugin") )
28 enable.default = 0
29
30 -- collectd_tcpconns.listeningports (ListeningPorts)
31 listeningports = s:option( Flag, "ListeningPorts", translate("Monitor all local listen ports") )
32 listeningports.default = 1
33 listeningports:depends( "enable", 1 )
34
35 -- collectd_tcpconns.localports (LocalPort)
36 localports = s:option( Value, "LocalPorts", translate("Monitor local ports") )
37 localports.optional = true
38 localports:depends( "enable", 1 )
39
40 -- collectd_tcpconns.remoteports (RemotePort)
41 remoteports = s:option( Value, "RemotePorts", translate("Monitor remote ports") )
42 remoteports.optional = true
43 remoteports:depends( "enable", 1 )
44
45 return m