From 0a2c7b9e5c1745e28451825c838fc38752bebf60 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Thu, 16 Nov 2017 08:22:14 +0100 Subject: luci-mod-admin-full: indicate DHCPv6 hostname mismatch In case the DUID can be mapped to the MAC-Address of an already known host, show the already know hostname next to the DHCPv6 supplied one in case they differ. Signed-off-by: Mathias Kresin --- .../luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm | 5 ++++- modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'modules/luci-mod-admin-full/luasrc') diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm index 1f50db5b9e..ea6ee91c71 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm @@ -84,7 +84,10 @@ ? '
? (%h)
'.format(host.name || host.ipv4 || host.ipv6) : '?'; else - tr.insertCell(-1).innerHTML = st[1][i].hostname; + tr.insertCell(-1).innerHTML = + (host && host.name && st[1][i].hostname != host.name) + ? '
%h (%h)
'.format(st[1][i].hostname, host.name) + : st[1][i].hostname; tr.insertCell(-1).innerHTML = st[1][i].ip6addr; tr.insertCell(-1).innerHTML = st[1][i].duid; diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm index 626532e1b9..9f44ac76d5 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm @@ -423,7 +423,10 @@ ? '
? (%h)
'.format(host.name || host.ipv4 || host.ipv6) : '?'; else - tr.insertCell(-1).innerHTML = info.leases6[i].hostname; + tr.insertCell(-1).innerHTML = + (host && host.name && info.leases6[i].hostname != host.name) + ? '
%h (%h)
'.format(info.leases6[i].hostname, host.name) + : info.leases6[i].hostname; tr.insertCell(-1).innerHTML = info.leases6[i].ip6addr; tr.insertCell(-1).innerHTML = info.leases6[i].duid; -- cgit v1.2.3