c60de5efa39f64cd8aa141e08bdad7e46ff137c2
[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
18 -- collectd_tcpconns config section
19 s = m:section( NamedSection, "collectd_tcpconns", "luci_statistics" )
20
21 -- collectd_tcpconns.enable
22 enable = s:option( Flag, "enable" )
23 enable.default = 0
24
25 -- collectd_tcpconns.listeningports (ListeningPorts)
26 listeningports = s:option( Flag, "ListeningPorts" )
27 listeningports.default = 1
28 listeningports:depends( "enable", 1 )
29
30 -- collectd_tcpconns.localports (LocalPort)
31 localports = s:option( Value, "LocalPorts" )
32 localports.optional = true
33 localports:depends( "enable", 1 )
34
35 -- collectd_tcpconns.remoteports (RemotePort)
36 remoteports = s:option( Value, "RemotePorts" )
37 remoteports.optional = true
38 remoteports:depends( "enable", 1 )
39
40 return m