cleanup templating

This commit is contained in:
2023-01-22 13:01:35 -06:00
parent 2c02b4751d
commit aa4397ba56
8 changed files with 77 additions and 75 deletions
+10 -5
View File
@@ -8,9 +8,12 @@ window.init = function init() {
const interfaceID = Object.keys(networkInterfaces)[i];
const interfaceObj = networkInterfaces[interfaceID];
html += `<tr><td><span class="if-${interfaceID.substring(0, 2)}">${interfaceID}</span></td>`;
html += `<td>${interfaceObj[0].address}</td>`;
html += `<td>${interfaceObj[0].netmask}</td>`;
html += `
<tr>
<td><span class="if-${interfaceID.substring(0, 2)}">${interfaceID}</span></td>
<td>${interfaceObj[0].address}</td>
<td>${interfaceObj[0].netmask}</td>
`;
if (interfaceObj[0].searchTruncated) {
html += `<td class='red'>`;
@@ -18,8 +21,10 @@ window.init = function init() {
html += `<td class='green'>`;
}
html += `${interfaceObj[0].firstSearchAddress} - ${interfaceObj[0].lastSearchAddress}</td>`;
html += `</tr>`;
html += `
${interfaceObj[0].firstSearchAddress} - ${interfaceObj[0].lastSearchAddress}</td>
</tr>
`;
document.getElementById('network-interfaces').innerHTML = html;
}