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

View file

@ -348,7 +348,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') }, [