root/ff-luci/trunk/applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua @ 2226

Revision 2226, 2.0 KB (checked in by jow, 5 years ago)

* luci/statistics: complete cbi model translation

  • Property svn:keywords set to Id
RevLine 
[2094]1--[[
2
3Luci configuration model for statistics - collectd network plugin configuration
4(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6Licensed under the Apache License, Version 2.0 (the "License");
7you may not use this file except in compliance with the License.
8You 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
[2226]17m = Map("luci_statistics")
[2094]18
19-- collectd_network config section
[2226]20s = m:section( NamedSection, "collectd_network", "luci_statistics" )
[2094]21
22-- collectd_network.enable
[2226]23enable = s:option( Flag, "enable" )
[2094]24enable.default = 0
25
26
27-- collectd_network_listen config section (Listen)
[2226]28listen = m:section( TypedSection, "collectd_network_listen" )
[2094]29listen.addremove = true
30listen.anonymous = true
31
32-- collectd_network_listen.host
[2226]33listen_host = listen:option( Value, "host" )
[2094]34listen_host.default = "0.0.0.0"
35
36-- collectd_network_listen.port
[2226]37listen_port = listen:option( Value, "port" )
[2094]38listen_port.default   = 25826
39listen_port.isinteger = true
40listen_port.optional  = true
41
42
43-- collectd_network_server config section (Server)
[2226]44server = m:section( TypedSection, "collectd_network_server" )
[2094]45server.addremove = true
46server.anonymous = true
47
48-- collectd_network_server.host
[2226]49server_host = server:option( Value, "host" )
[2094]50server_host.default = "0.0.0.0"
51
52-- collectd_network_server.port
[2226]53server_port = server:option( Value, "port" )
[2094]54server_port.default   = 25826
55server_port.isinteger = true
56server_port.optional  = true
57
58-- collectd_network.timetolive (TimeToLive)
[2226]59ttl = s:option( Value, "TimeToLive" )
[2094]60ttl.default   = 128
61ttl.isinteger = true
62ttl.optional  = true
63ttl:depends( "enable", 1 )
64
65-- collectd_network.forward (Forward)
[2226]66forward = s:option( Flag, "Forward" )
[2094]67forward.default  = 0
68forward.optional = true
69forward:depends( "enable", 1 )
70
[2226]71-- collectd_network.cacheflush (CacheFlush)
72cacheflush = s:option( Value, "CacheFlush" )
73cacheflush.default   = 86400
74cacheflush.isinteger = true
75cacheflush.optional  = true
76cacheflush:depends( "enable", 1 )
[2094]77
78
79return m
Note: See TracBrowser for help on using the browser.