From: Jo-Philipp Wich Date: Thu, 11 Nov 2021 11:48:07 +0000 (+0100) Subject: luci-mod-network: use firewall.getZoneColorStyle() in interface view X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=849772df96784a0d5480ddf6305e30e7d442740f;p=openwrt-luci.git luci-mod-network: use firewall.getZoneColorStyle() in interface view Use the new `firewall.getZoneColorStyle()` helper to apply background zone color styles to the interface boxes. Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 371d82770e..52ad6e9b6f 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -1177,7 +1177,7 @@ return view.extend({ var node = E('div', { 'class': 'ifacebox' }, [ E('div', { 'class': 'ifacebox-head', - 'style': 'background-color:%s'.format(zone ? zone.getColor() : '#EEEEEE'), + 'style': firewall.getZoneColorStyle(zone), 'title': zone ? _('Part of zone %q').format(zone.getName()) : _('No zone assigned') }, E('strong', net.getName().toUpperCase())), E('div', {