gluon-status-page: Code clarification and formatting

This commit is contained in:
Igor Scheller 2022-04-11 23:44:55 +02:00
parent 3e0a6a64e3
commit ea7b3163d1
3 changed files with 12 additions and 10 deletions

View File

@ -231,10 +231,10 @@
<table>
<tbody>
<% for _, radio in ipairs(radios) do -%>
<tr>
<th><%| radio.name %></th>
<td><%| translatef('Channel %u', radio.channel) %></td>
</tr>
<tr>
<th><%| radio.name %></th>
<td><%| translatef('Channel %u', radio.channel) %></td>
</tr>
<%- end %>
</tbody>
</table>

File diff suppressed because one or more lines are too long

View File

@ -192,8 +192,9 @@
div.style.display = '';
var table = document.getElementById('mesh-vpn-peers');
while (table.firstElementChild.lastChild)
table.firstElementChild.removeChild(table.firstElementChild.lastChild);
var tbody = table.firstElementChild;
while (tbody.lastChild)
tbody.removeChild(tbody.lastChild);
var peers = add_group([], data);
peers.sort();
@ -212,7 +213,7 @@
td.textContent = _['not connected'];
tr.appendChild(td);
table.firstElementChild.appendChild(tr);
tbody.appendChild(tr);
});
}
@ -444,8 +445,9 @@
}
function Neighbour(iface, addr, color, destroy) {
var th = iface.table.firstElementChild.firstElementChild;
var el = iface.table.firstElementChild.insertRow();
var tb = iface.table.firstElementChild;
var th = tb.firstElementChild;
var el = tb.insertRow();
var tdHostname = el.insertCell();
tdHostname.setAttribute('data-label', th.children[0].textContent);