summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/luasrc
diff options
context:
space:
mode:
authorOlli Asikainen <olli.asikainen@gmail.com>2019-02-08 16:49:04 +0200
committerJo-Philipp Wich <jo@mein.io>2019-04-08 10:18:59 +0200
commit8d839ddfb8f169c01e516e1a5b0c2e8de6948183 (patch)
tree5ba46e3018f8c351dd7038bc874e5e4de9989bad /modules/luci-mod-status/luasrc
parenta4f5b4002567e9a3719d0b29ea99126a0556bff4 (diff)
luci-mod-status: Remove port suffix where not applicable
Submitted-by: Olli Asikainen <olli.asikainen@gmail.com> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-status/luasrc')
-rw-r--r--modules/luci-mod-status/luasrc/view/admin_status/connections.htm4
1 files changed, 2 insertions, 2 deletions
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 d9099aa078..e3dd39d607 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)
]);
}