summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs/luci-static/resources/view
diff options
context:
space:
mode:
authorMax S Kash <asukms@ya.ru>2022-03-08 18:57:01 +0500
committerFlorian Eckert <fe@dev.tdt.de>2022-03-28 09:52:05 +0200
commit8a46648e5bfb4b8f4d2452c51b5181631d260b6f (patch)
treea3351a743560a9a85e18b0141136de61958c994d /modules/luci-mod-network/htdocs/luci-static/resources/view
parentd9ffe119858e80b051d0e4dd86615bba0341edd2 (diff)
luci-mod-status,mod-network: Added fqdn-name to DHCPv4 lease table
Added code to display fcdn-name in DHCPv4 lease table. (based on code in DHCPv6 lease table) Signed-off-by: Max S Kash <asukms@ya.ru> Indentation adjused and wrapped commit message Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources/view')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
index bf67785df1..5059b389b4 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
@@ -726,8 +726,17 @@ return view.extend({
else
exp = '%t'.format(lease.expires);
+ var hint = lease.macaddr ? hosts[lease.macaddr] : null,
+ name = hint ? hint.name : null,
+ host = null;
+
+ if (name && lease.hostname && lease.hostname != name)
+ host = '%s (%s)'.format(lease.hostname, name);
+ else if (lease.hostname)
+ host = lease.hostname;
+
return [
- lease.hostname || '?',
+ host || '-',
lease.ipaddr,
lease.macaddr,
exp