X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fbase%2Fluasrc%2Fmodel%2Fcbi%2Fadmin_network%2Fproto_static.lua;fp=modules%2Fbase%2Fluasrc%2Fmodel%2Fcbi%2Fadmin_network%2Fproto_static.lua;h=0000000000000000000000000000000000000000;hp=338c0b7d83cd2f492ab070aa502213720984965c;hb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;hpb=9edd0e46c3f880727738ce8ca6ff1c8b85f99ef4 diff --git a/modules/base/luasrc/model/cbi/admin_network/proto_static.lua b/modules/base/luasrc/model/cbi/admin_network/proto_static.lua deleted file mode 100644 index 338c0b7d8..000000000 --- a/modules/base/luasrc/model/cbi/admin_network/proto_static.lua +++ /dev/null @@ -1,90 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2011 Jo-Philipp Wich - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 -]]-- - -local map, section, net = ... -local ifc = net:get_interface() - -local ipaddr, netmask, gateway, broadcast, dns, accept_ra, send_rs, ip6addr, ip6gw -local mtu, metric - - -ipaddr = section:taboption("general", Value, "ipaddr", translate("IPv4 address")) -ipaddr.datatype = "ip4addr" - - -netmask = section:taboption("general", Value, "netmask", - translate("IPv4 netmask")) - -netmask.datatype = "ip4addr" -netmask:value("255.255.255.0") -netmask:value("255.255.0.0") -netmask:value("255.0.0.0") - - -gateway = section:taboption("general", Value, "gateway", translate("IPv4 gateway")) -gateway.datatype = "ip4addr" - - -broadcast = section:taboption("general", Value, "broadcast", translate("IPv4 broadcast")) -broadcast.datatype = "ip4addr" - - -dns = section:taboption("general", DynamicList, "dns", - translate("Use custom DNS servers")) - -dns.datatype = "ipaddr" -dns.cast = "string" - - -if luci.model.network:has_ipv6() then - - local ip6assign = section:taboption("general", Value, "ip6assign", translate("IPv6 assignment length"), - translate("Assign a part of given length of every public IPv6-prefix to this interface")) - ip6assign:value("", translate("disabled")) - ip6assign:value("64") - ip6assign.datatype = "max(64)" - - local ip6hint = section:taboption("general", Value, "ip6hint", translate("IPv6 assignment hint"), - translate("Assign prefix parts using this hexadecimal subprefix ID for this interface.")) - for i=33,64 do ip6hint:depends("ip6assign", i) end - - ip6addr = section:taboption("general", Value, "ip6addr", translate("IPv6 address")) - ip6addr.datatype = "ip6addr" - ip6addr:depends("ip6assign", "") - - - ip6gw = section:taboption("general", Value, "ip6gw", translate("IPv6 gateway")) - ip6gw.datatype = "ip6addr" - ip6gw:depends("ip6assign", "") - - - local ip6prefix = s:taboption("general", Value, "ip6prefix", translate("IPv6 routed prefix"), - translate("Public prefix routed to this device for distribution to clients.")) - ip6prefix.datatype = "ip6addr" - ip6prefix:depends("ip6assign", "") - -end - - -luci.tools.proto.opt_macaddr(section, ifc, translate("Override MAC address")) - - -mtu = section:taboption("advanced", Value, "mtu", translate("Override MTU")) -mtu.placeholder = "1500" -mtu.datatype = "max(9200)" - - -metric = section:taboption("advanced", Value, "metric", - translate("Use gateway metric")) - -metric.placeholder = "0" -metric.datatype = "uinteger"