Split up admin-core into admin-core and admin-full, preparing admin-mini
[project/luci.git] / modules / admin-full / 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", translate("a_n_routes"), translate("a_n_routes1"))
15
16 s = m:section(TypedSection, "route", "")
17 s.addremove = true
18 s.anonymous = true
19 s.template  = "cbi/tblsection"
20
21 iface = s:option(ListValue, "interface", translate("interface"))
22 luci.model.uci.foreach("network", "interface",
23         function (section)
24                 if section[".name"] ~= "loopback" then
25                         iface:value(section[".name"])
26                 end
27         end)
28
29 s:option(Value, "target", translate("target"), translate("a_n_r_target1"))
30
31 s:option(Value, "netmask", translate("netmask"), translate("a_n_r_netmask1")).rmemepty = true
32
33 s:option(Value, "gateway", translate("gateway"))
34
35 return m