luci-base: Make default for FileUpload 'safe'
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / olsrd.lua
1 -- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
2 -- Licensed to the public under the Apache License 2.0.
3
4 m = Map("luci_statistics",
5         translate("OLSRd Plugin Configuration"),
6         translate("The OLSRd plugin reads information about meshed networks from the txtinfo plugin of OLSRd."))
7
8 s = m:section(NamedSection, "collectd_olsrd", "luci_statistics" )
9
10 enable = s:option(Flag, "enable", translate("Enable this plugin"))
11 enable.default = 0
12
13 host = s:option(Value, "Host", translate("Host"), translate("IP or hostname where to get the txtinfo output from"))
14 host.placeholder = "127.0.0.1"
15 host.datatype = "host"
16 host.rmempty = true
17
18 port = s:option(Value, "Port", translate("Port"))
19 port.placeholder = "2006"
20 port.datatype = "range(0,65535)"
21 port.rmempty = true
22 port.cast = "string"
23
24 cl = s:option(ListValue, "CollectLinks", translate("CollectLinks"),
25         translate("Specifies what information to collect about links."))
26 cl:value("No")
27 cl:value("Summary")
28 cl:value("Detail")
29 cl.default = "Detail"
30
31 cr = s:option(ListValue, "CollectRoutes", translate("CollectRoutes"),
32         translate("Specifies what information to collect about routes."))
33 cr:value("No")
34 cr:value("Summary")
35 cr:value("Detail")
36 cr.default = "Summary"
37
38 ct = s:option(ListValue, "CollectTopology", translate("CollectTopology"),
39         translate("Specifies what information to collect about the global topology."))
40 ct:value("No")
41 ct:value("Summary")
42 ct:value("Detail")
43 ct.default = "Summary"
44
45 return m