luci-mod-status: iptables: always make tab pane visible

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 d24e3295f0)
This commit is contained in:
Jo-Philipp Wich 2021-05-07 19:04:38 +02:00
parent 56c323505b
commit e9b6431b14

View 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') }, [