e3eb7b2c4bf62635883f6a70a58a2db0d43ba6b4
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / olsrd.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
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
13 m = Map("luci_statistics",
14 translate("OLSRd Plugin Configuration"),
15 translate("The OLSRd plugin reads information about meshed networks from the txtinfo plugin of OLSRd."))
16
17 s = m:section(NamedSection, "collectd_olsrd", "luci_statistics" )
18
19 enable = s:option(Flag, "enable", translate("Enable this plugin"))
20 enable.default = 0
21
22 host = s:option(Value, "Host", translate("Host"), translate("IP or hostname where to get the txtinfo output from"))
23 host.placeholder = "127.0.0.1"
24 host.datatype = "host"
25 host.rmempty = true
26
27 port = s:option(Value, "Port", translate("Port"))
28 port.placeholder = "2006"
29 port.datatype = "range(0,65535)"
30 port.rmempty = true
31 port.cast = "string"
32
33 cl = s:option(ListValue, "CollectLinks", translate("CollectLinks"),
34 translate("Specifies what information to collect about links."))
35 cl:value("No")
36 cl:value("Summary")
37 cl:value("Detail")
38 cl.default = "Detail"
39
40 cr = s:option(ListValue, "CollectRoutes", translate("CollectRoutes"),
41 translate("Specifies what information to collect about routes."))
42 cr:value("No")
43 cr:value("Summary")
44 cr:value("Detail")
45 cr.default = "Summary"
46
47 ct = s:option(ListValue, "CollectTopology", translate("CollectTopology"),
48 translate("Specifies what information to collect about the global topology."))
49 ct:value("No")
50 ct:value("Summary")
51 ct:value("Detail")
52 ct.default = "Summary"
53
54 return m