luci-mod-status: nftables add counter and comment for empty match
authorIngo Heinrich <ingo-github@goheinrich.de>
Sat, 4 Mar 2023 11:17:50 +0000 (12:17 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 3 Apr 2023 11:16:37 +0000 (13:16 +0200)
Signed-off-by: Ingo Heinrich <ingo-github@goheinrich.de>
(cherry picked from commit 8c7c56f4e415a3b80bf91c98aa02a638111bef51)

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

index 33a19bee2bd87da0086f08736ed3136a82b814cb..7b1a3badb2d3755d0ec347267f0bbb9ff656f802 100644 (file)
@@ -508,7 +508,7 @@ return view.extend({
                }
 
                if (empty)
-                       dom.content(row.childNodes[0], E('em', [ _('Any packet', 'nft match any traffic') ]));
+                       dom.append(row.childNodes[0], E('span', { 'class': 'ifacebadge' }, '<em>%h</em>'.format(_('Any packet', 'nft match any traffic'))));
 
                return row;
        },