X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fview%2Fadmin_status%2Findex.htm;h=18f66c2a82d326f3a88a21f5c3bc6d74dbf4f447;hb=b121f958621efd5d81451e2de3e7d35a828645bc;hp=d29a89427687738fca1b2493134ac8c01ecc8f9f;hpb=415b99de5a5c5e023a81cc6399ee474993996284;p=project%2Fluci.git 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 d29a89427..18f66c2a8 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 @@ -38,7 +38,7 @@ local wan6 = ntm:get_wan6net() local conn_count = tonumber( - fs.readfile("/proc/sys/net/netfilter/nf_conntrack_count")) or 0 + fs.readfile("/proc/sys/net/netfilter/nf_conntrack_count") or "") or 0 local conn_max = tonumber(( luci.sys.exec("sysctl net.nf_conntrack_max") or @@ -417,15 +417,16 @@ tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); var host = hosts[duid2mac(info.leases6[i].duid)]; - if (host) - tr.insertCell(-1).innerHTML = String.format( - '
%s
', - ((host.name && (host.ipv4 || host.ipv6)) - ? '%h (%s)'.format(host.name, host.ipv4 || host.ipv6) - : '%h'.format(host.name || host.ipv4 || host.ipv6)).nobr() - ); + if (!info.leases6[i].hostname) + tr.insertCell(-1).innerHTML = + (host && (host.name || host.ipv4 || host.ipv6)) + ? '
? (%h)
'.format(host.name || host.ipv4 || host.ipv6) + : '?'; else - tr.insertCell(-1).innerHTML = info.leases6[i].hostname ? 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;