From: Jo-Philipp Wich Date: Mon, 20 May 2024 08:07:41 +0000 (+0200) Subject: luci-mod-status: fix ordering realtime connections by traffic X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=e7f2e6bc8ee2bbbfd3d1f7caa570a6529cc03eee;p=openwrt-luci.git luci-mod-status: fix ordering realtime connections by traffic Add raw byte values to properly order rows by transferred bytes, regardless of the dispalyed unit. Fixes: #7129 Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js index 23ff1df53e..bb5e937e36 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js @@ -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.')) ] ]); }