commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e
[project/luci.git] / modules / admin-core / luasrc / model / cbi / admin_network / routes.lua
diff --git a/modules/admin-core/luasrc/model/cbi/admin_network/routes.lua b/modules/admin-core/luasrc/model/cbi/admin_network/routes.lua
new file mode 100644 (file)
index 0000000..a2a27eb
--- /dev/null
@@ -0,0 +1,24 @@
+-- ToDo: Translate, Add descriptions and help texts
+m = Map("network", "Statische Routen", [[Statische Routen geben an,
+über welche Schnittstelle und welches Gateway ein bestimmter Host
+oder ein bestimmtes Netzwerk erreicht werden kann.]])
+
+s = m:section(TypedSection, "route")
+s.addremove = true
+s.anonymous = true
+s.template  = "cbi/tblsection"
+
+iface = s:option(ListValue, "interface", "Schnittstelle")
+for k, v in pairs(luci.model.uci.sections("network")) do
+       if v[".type"] == "interface" and k ~= "loopback" then
+               iface:value(k)
+       end
+end
+
+s:option(Value, "target", "Ziel", "Host-IP oder Netzwerk")
+
+s:option(Value, "netmask", "Netzmaske", "falls Ziel ein Netzwerk ist").rmemepty = true
+
+s:option(Value, "gateway", "Gateway")
+
+return m
\ No newline at end of file