From: Olli Asikainen Date: Fri, 8 Feb 2019 14:49:04 +0000 (+0200) Subject: luci-mod-status: Remove port suffix where not applicable X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8d839ddfb8f169c01e516e1a5b0c2e8de6948183;p=oweals%2Fluci.git luci-mod-status: Remove port suffix where not applicable Submitted-by: Olli Asikainen Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-mod-status/luasrc/view/admin_status/connections.htm b/modules/luci-mod-status/luasrc/view/admin_status/connections.htm index d9099aa07..e3dd39d60 100644 --- a/modules/luci-mod-status/luasrc/view/admin_status/connections.htm +++ b/modules/luci-mod-status/luasrc/view/admin_status/connections.htm @@ -165,8 +165,8 @@ rows.push([ c.layer3.toUpperCase(), c.layer4.toUpperCase(), - src + ':' + c.sport, - dst + ':' + c.dport, + c.hasOwnProperty('sport') ? (src + ':' + c.sport) : src, + c.hasOwnProperty('dport') ? (dst + ':' + c.dport) : dst, '%1024.2mB (%d <%:Pkts.%>)'.format(c.bytes, c.packets) ]); }