* Core translation
[project/luci.git] / modules / admin-core / luasrc / model / cbi / admin_network / routes.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
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 $Id$
13 ]]--
14 m = Map("network", "Statische Routen", [[Statische Routen geben an,
15 über welche Schnittstelle und welches Gateway ein bestimmter Host
16 oder ein bestimmtes Netzwerk erreicht werden kann.]])
17
18 s = m:section(TypedSection, "route", "")
19 s.addremove = true
20 s.anonymous = true
21 s.template  = "cbi/tblsection"
22
23 iface = s:option(ListValue, "interface", "Schnittstelle")
24 luci.model.uci.foreach("network", "interface",
25         function (section)
26                 if section[".name"] ~= "loopback" then
27                         iface:value(section[".name"])
28                 end
29         end)
30
31 s:option(Value, "target", "Ziel", "Host-IP oder Netzwerk")
32
33 s:option(Value, "netmask", "Netzmaske", "falls Ziel ein Netzwerk ist").rmemepty = true
34
35 s:option(Value, "gateway", "Gateway")
36
37 return m