fix: Initialize shaped_devices array if null in shapedDevices()

This commit is contained in:
Herbert Wolverson (aider) 2025-01-22 15:30:58 -06:00
parent a40a7179b2
commit 4b237b5b58

View File

@ -104,6 +104,11 @@ function deleteSdRow(id) {
} }
function shapedDevices() { function shapedDevices() {
// Initialize shaped_devices if null
if (!shaped_devices) {
shaped_devices = [];
}
let html = "<table style='height: 500px; overflow: scroll; border-collapse: collapse; width: 100%; padding: 0px'>"; let html = "<table style='height: 500px; overflow: scroll; border-collapse: collapse; width: 100%; padding: 0px'>";
html += "<thead style='position: sticky; top: 0; height: 50px; background: navy; color: white;'>"; html += "<thead style='position: sticky; top: 0; height: 50px; background: navy; color: white;'>";
html += "<tr style='font-size: 9pt;'><th>Circuit ID</th><th>Circuit Name</th><th>Device ID</th><th>Device Name</th><th>Parent Node</th><th>MAC</th><th>IPv4</th><th>IPv6</th><th>Download Min</th><th>Upload Min</th><th>Download Max</th><th>Upload Max</th><th>Comment</th><th></th></th></tr>"; html += "<tr style='font-size: 9pt;'><th>Circuit ID</th><th>Circuit Name</th><th>Device ID</th><th>Device Name</th><th>Parent Node</th><th>MAC</th><th>IPv4</th><th>IPv6</th><th>Download Min</th><th>Upload Min</th><th>Download Max</th><th>Upload Max</th><th>Comment</th><th></th></th></tr>";