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 <dev@kresin.me>
This commit is contained in:
parent
9f5a1de8b1
commit
0a2c7b9e5c
2 changed files with 8 additions and 2 deletions
|
@ -84,7 +84,10 @@
|
|||
? '<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap">? (%h)</div>'.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)
|
||||
? '<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap">%h (%h)</div>'.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;
|
||||
|
|
|
@ -423,7 +423,10 @@
|
|||
? '<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap">? (%h)</div>'.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)
|
||||
? '<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap">%h (%h)</div>'.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;
|
||||
|
|
Loading…
Reference in a new issue