Remove trailing commas from interface titles

Noah Zalev committed Jul 12, 2021 at 17:51 UTC 992e538d5116b4814c6e7bfa88e2fa4a611ea8f3
1 file changed +4 -4
views/default.handlebars
+4 -4
@@ -10001,10 +10001,10 @@
10001 var m = network.netif2[i];
10002 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;
10003 x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>';
10004 - var ifTitle = [];
10005 - if (i != null) { ifTitle.push(i); }
10006 - if (m[0].fqdn != null) { ifTitle.push(m[0].fqdn); }
10007 - if (ifTitle.length > 0) { x += '<div style=margin-bottom:3px><b>' + EscapeHtml(ifTitle.join(', ')) + '</b></div>'; }
10004 + var ifTitle = '';
10005 + if (i != null) ifTitle += i;
10006 + if (m[0].fqdn != null && m[0].fqdn != '') ifTitle += ', ' + m[0].fqdn;
10007 + if (ifTitle.length > 0) { x += '<div style=margin-bottom:3px><b>' + EscapeHtml(ifTitle) + '</b></div>'; }
10008 if (m.desc) { x += addDetailItem("Description", EscapeHtml(m.desc).split('(R)').join('&reg;')); }
10009 //if (m.dnssuffix) { x += addDetailItem("DNS Suffix", m.dnssuffix); }
10010 if (typeof m[0].mac == 'string') {