modules/admin-{mini,full}: display client hostnames in lease overview
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 4 Apr 2010 17:28:15 +0000 (17:28 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 4 Apr 2010 17:28:15 +0000 (17:28 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua
modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua

index 678ebab06cb42813b2d5f078eeb693a1421bd885..70b49d7fa455a583b6e9bec37ed4a389a1a4997d 100644 (file)
@@ -38,6 +38,13 @@ end
 
 if leases then
        v = m2:section(Table, leases, translate("Active Leases"))
+
+       name = v:option(DummyValue, 4, translate("Hostname"))
+       function name.cfgvalue(self, ...)
+               local value = DummyValue.cfgvalue(self, ...)
+               return (value == "*") and "?" or value
+       end
+
        ip = v:option(DummyValue, 3, translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
        
        mac  = v:option(DummyValue, 2, translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
index 62bfe5721eb89f0e468069e072e0ec8db2e04786..5547db6cdd552103675d05558e004de0c74a4d87 100644 (file)
@@ -75,6 +75,11 @@ end
 
 if leases then
        v = m:section(Table, leases, translate("Active Leases"))
+       name = v:option(DummyValue, 4, translate("Hostname"))
+       function name.cfgvalue(self, ...)
+               local value = DummyValue.cfgvalue(self, ...)
+               return (value == "*") and "?" or value
+       end
        ip = v:option(DummyValue, 3, translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
        mac  = v:option(DummyValue, 2, translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
        ltime = v:option(DummyValue, 1, translate("Leasetime remaining"))