From 08ceafc2e965cef633ea918d6561e30cadf8ca95 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 4 Apr 2010 17:28:15 +0000 Subject: modules/admin-{mini,full}: display client hostnames in lease overview --- modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua | 7 +++++++ modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua | 5 +++++ 2 files changed, 12 insertions(+) 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 678ebab06..70b49d7fa 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/dhcpleases.lua @@ -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("IPv4-Address")) mac = v:option(DummyValue, 2, translate("MAC-Address")) diff --git a/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua b/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua index 62bfe5721..5547db6cd 100644 --- a/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua +++ b/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua @@ -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("IPv4-Address")) mac = v:option(DummyValue, 2, translate("MAC-Address")) ltime = v:option(DummyValue, 1, translate("Leasetime remaining")) -- cgit v1.2.3