* Added many descriptions
[project/luci.git] / module / admin-core / src / model / cbi / admin_services / olsrd.lua
1 -- ToDo: Autodetect things, Translate, Add descriptions
2 require("ffluci.fs")
3
4 m = Map("olsr", "OLSR", [[OLSR ist ein flexibles Routingprotokoll, 
5 dass den Aufbau von mobilen Ad-Hoc Netzen unterstützt.]])
6
7 s = m:section(NamedSection, "general", "olsr", "Allgemeine Einstellungen")
8
9 debug = s:option(ListValue, "DebugLevel", "Debugmodus")
10 for i=0, 9 do
11         debug:value(i)
12 end
13
14 ipv = s:option(ListValue, "IpVersion", "Internet Protokoll")
15 ipv:value("4", "IPv4")
16 ipv:value("6", "IPv6")
17
18 noint = s:option(Flag, "AllowNoInt", "Start ohne Netzwerk")
19 noint.enabled = "yes"
20 noint.disabled = "no"
21
22 s:option(Value, "Pollrate", "Abfragerate (Pollrate)", "s").isnumber = true
23
24 tcr = s:option(ListValue, "TcRedundancy", "TC-Redundanz")
25 tcr:value("0", "MPR-Selektoren")
26 tcr:value("1", "MPR-Selektoren und MPR")
27 tcr:value("2", "Alle Nachbarn")
28
29 s:option(Value, "MprCoverage", "MPR-Erfassung").isinteger = true
30
31 lql = s:option(ListValue, "LinkQualityLevel", "VQ-Level")
32 lql:value("0", "deaktiviert")
33 lql:value("1", "MPR-Auswahl")
34 lql:value("2", "MPR-Auswahl und Routing")
35
36 lqfish = s:option(Flag, "LinkQualityFishEye", "VQ-Fisheye")
37
38 s:option(Value, "LinkQualityWinSize", "VQ-Fenstergröße").isinteger = true
39
40 s:option(Value, "LinkQualityDijkstraLimit", "VQ-Dijkstralimit")
41
42 hyst = s:option(Flag, "UseHysteresis", "Hysterese aktivieren")
43 hyst.enabled = "yes"
44 hyst.disabled = "no"
45
46
47 i = m:section(TypedSection, "Interface", "Schnittstellen")
48 i.anonymous = true
49 i.addremove = true
50 i.dynamic = true
51
52 i:option(Value, "Interface", "Netzwerkschnittstellen")
53
54 i:option(Value, "HelloInterval", "Hello-Intervall").isnumber = true
55
56 i:option(Value, "HelloValidityTime", "Hello-Gültigkeit").isnumber = true
57
58 i:option(Value, "TcInterval", "TC-Intervall").isnumber = true
59
60 i:option(Value, "TcValidityTime", "TC-Gültigkeit").isnumber = true
61
62 i:option(Value, "MidInterval", "MID-Intervall").isnumber = true
63
64 i:option(Value, "MidValidityTime", "MID-Gültigkeit").isnumber = true
65
66 i:option(Value, "HnaInterval", "HNA-Intervall").isnumber = true
67
68 i:option(Value, "HnaValidityTime", "HNA-Gültigkeit").isnumber = true
69
70
71 p = m:section(TypedSection, "LoadPlugin", "Plugins")
72 p.addremove = true
73 p.dynamic = true
74
75 lib = p:option(ListValue, "Library", "Bibliothek")
76 lib:value("")
77 for k, v in pairs(ffluci.fs.dir("/usr/lib")) do
78         if v:sub(1, 6) == "olsrd_" then
79                 lib:value(v)
80         end
81 end
82
83 return m