diff options
Diffstat (limited to 'modules/admin-full/luasrc/model/cbi')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua | 2 | ||||
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua b/modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua index 3f631b38b..e0e65e5e4 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua @@ -31,6 +31,8 @@ s.anonymous = true s.template = "cbi/tblsection" name = s:option(Value, "name", translate("Hostname")) +name.datatype = "hostname" +name.rmempty = true mac = s:option(Value, "mac", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address")) mac.datatype = "macaddr" diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua b/modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua index fa8b217de..c791a57d0 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua @@ -23,7 +23,13 @@ s.anonymous = true s.template = "cbi/tblsection" hn = s:option(Value, "name", translate("Hostname")) +hn.datatype = "hostname" +hn.rmempty = true + ip = s:option(Value, "ip", translate("IP address")) +ip.datatype = "ipaddr" +ip.rmempty = true + for i, dataset in ipairs(luci.sys.net.arptable()) do ip:value( dataset["IP address"], |