luci-mod-status: fix ordering realtime connections by traffic openwrt-23.05
authorJo-Philipp Wich <jo@mein.io>
Mon, 20 May 2024 08:07:41 +0000 (10:07 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 20 May 2024 08:09:14 +0000 (10:09 +0200)
Add raw byte values to properly order rows by transferred bytes,
regardless of the dispalyed unit.

Fixes: #7129
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e7f2e6bc8ee2bbbfd3d1f7caa570a6529cc03eee)

modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js

index 168bfefdf8673d7c6cf5f585588e45999538a947..e655a8d1719cd236b080d75f01effd075ab813de 100644 (file)
@@ -135,7 +135,7 @@ return view.extend({
                                c.layer4.toUpperCase(),
                                '%h'.format(c.hasOwnProperty('sport') ? (src + ':' + c.sport) : src),
                                '%h'.format(c.hasOwnProperty('dport') ? (dst + ':' + c.dport) : dst),
-                               '%1024.2mB (%d %s)'.format(c.bytes, c.packets, _('Pkts.'))
+                               [ c.bytes, '%1024.2mB (%d %s)'.format(c.bytes, c.packets, _('Pkts.')) ]
                        ]);
                }