Remove trailing commas from interface titles

This commit is contained in:
Noah Zalev 2021-07-12 17:51:40 -04:00
parent 8afd3fdd21
commit 992e538d51

View File

@ -10001,10 +10001,10 @@
var m = network.netif2[i]; var m = network.netif2[i];
if ((Array.isArray(m) == false) || (m.length < 1) || (m[0] == null) || ((typeof m[0].mac == 'string') && (m[0].mac.startsWith('00:00:00:00')))) continue; if ((Array.isArray(m) == false) || (m.length < 1) || (m[0] == null) || ((typeof m[0].mac == 'string') && (m[0].mac.startsWith('00:00:00:00')))) continue;
x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>'; x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>';
var ifTitle = []; var ifTitle = '';
if (i != null) { ifTitle.push(i); } if (i != null) ifTitle += i;
if (m[0].fqdn != null) { ifTitle.push(m[0].fqdn); } if (m[0].fqdn != null && m[0].fqdn != '') ifTitle += ', ' + m[0].fqdn;
if (ifTitle.length > 0) { x += '<div style=margin-bottom:3px><b>' + EscapeHtml(ifTitle.join(', ')) + '</b></div>'; } if (ifTitle.length > 0) { x += '<div style=margin-bottom:3px><b>' + EscapeHtml(ifTitle) + '</b></div>'; }
if (m.desc) { x += addDetailItem("Description", EscapeHtml(m.desc).split('(R)').join('&reg;')); } if (m.desc) { x += addDetailItem("Description", EscapeHtml(m.desc).split('(R)').join('&reg;')); }
//if (m.dnssuffix) { x += addDetailItem("DNS Suffix", m.dnssuffix); } //if (m.dnssuffix) { x += addDetailItem("DNS Suffix", m.dnssuffix); }
if (typeof m[0].mac == 'string') { if (typeof m[0].mac == 'string') {