gluon-status-page: Move mesh vpn id to table body, directly use table body

This commit is contained in:
Igor Scheller 2022-04-17 23:08:31 +02:00
parent ea7b3163d1
commit 68a5a74d1d
3 changed files with 7 additions and 9 deletions

View File

@ -251,8 +251,8 @@
<div id="mesh-vpn" style="display: none">
<h3><%:Mesh VPN%></h3>
<table id="mesh-vpn-peers">
<tbody></tbody>
<table>
<tbody id="mesh-vpn-peers"></tbody>
</table>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -191,8 +191,7 @@
}
div.style.display = '';
var table = document.getElementById('mesh-vpn-peers');
var tbody = table.firstElementChild;
var tbody = document.getElementById('mesh-vpn-peers');
while (tbody.lastChild)
tbody.removeChild(tbody.lastChild);
@ -445,9 +444,8 @@
}
function Neighbour(iface, addr, color, destroy) {
var tb = iface.table.firstElementChild;
var th = tb.firstElementChild;
var el = tb.insertRow();
var th = iface.tbody.firstElementChild;
var el = iface.tbody.insertRow();
var tdHostname = el.insertCell();
tdHostname.setAttribute('data-label', th.children[0].textContent);
@ -694,7 +692,7 @@
}
var info = {
'table': el.firstElementChild,
'tbody': el.firstElementChild.firstElementChild,
'signalgraph': signalgraph,
'ifname': ifname,
'wireless': wireless,