tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
var host = hosts[duid2mac(st[1][i].duid)];
- if (!st[1][i].hostname && host)
- tr.insertCell(-1).innerHTML = String.format(
- '<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis">%s</div>',
- ((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 (!st[1][i].hostname)
+ tr.insertCell(-1).innerHTML =
+ (host && (host.name || host.ipv4 || host.ipv6))
+ ? '<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 ? st[1][i].hostname : '?';
+ tr.insertCell(-1).innerHTML = st[1][i].hostname;
tr.insertCell(-1).innerHTML = st[1][i].ip6addr;
tr.insertCell(-1).innerHTML = st[1][i].duid;
tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
var host = hosts[duid2mac(info.leases6[i].duid)];
- if (!info.leases6[i].hostname && host)
- tr.insertCell(-1).innerHTML = String.format(
- '<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis">%s</div>',
- ((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))
+ ? '<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 ? info.leases6[i].hostname : '?';
+ tr.insertCell(-1).innerHTML = info.leases6[i].hostname;
tr.insertCell(-1).innerHTML = info.leases6[i].ip6addr;
tr.insertCell(-1).innerHTML = info.leases6[i].duid;