summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/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-status/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-status/htdocs/luci-static/resources/view')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js
index b93f26875d..956c1b20f9 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js
@@ -102,8 +102,16 @@ return baseclass.extend({
else
exp = '%t'.format(lease.expires);
+ var hint = lease.macaddr ? machints.filter(function(h) { return h[0] == lease.macaddr })[0] : null,
+ host = null;
+
+ if (hint && lease.hostname && lease.hostname != hint[1])
+ host = '%s (%s)'.format(lease.hostname, hint[1]);
+ else if (lease.hostname)
+ host = lease.hostname;
+
rows = [
- lease.hostname || '-',
+ host || '-',
lease.ipaddr,
lease.macaddr,
exp