mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-08 23:33:39 +00:00
cleanup templating
This commit is contained in:
+10
-5
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user