luci-mod-status: iptables: always make tab pane visible
authorJo-Philipp Wich <jo@mein.io>
Fri, 7 May 2021 17:04:38 +0000 (19:04 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 7 May 2021 17:19:35 +0000 (19:19 +0200)
When ip6tables is not present, the tab group was not initialized,
causing the iptables status display to be empty with certain themes.

Manually mark the pane active in this case to avoid the problem.

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

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

index 2ce744c60e5acdadc5133437f77c064e3ab77d8d..514a654f19fe47837adfc1b9aab5a70a0facba07 100644 (file)
@@ -313,7 +313,7 @@ return view.extend({
                                }, [ _('Restart Firewall') ])
                        ]),
                        E('div', {}, [
-                               E('div', { 'data-tab': 'iptables', 'data-tab-title': has_ip6tables ? _('IPv4 Firewall') : null }, [
+                               E('div', { 'data-tab': 'iptables', 'data-tab-title': has_ip6tables ? _('IPv4 Firewall') : null, 'data-tab-active': has_ip6tables ? null : true }, [
                                        E('p', {}, E('em', { 'class': 'spinning' }, [ _('Collecting data...') ]))
                                ]),
                                has_ip6tables ? E('div', { 'data-tab': 'ip6tables', 'data-tab-title': _('IPv6 Firewall') }, [