luci-mod-network: use firewall.getZoneColorStyle() in interface view
authorJo-Philipp Wich <jo@mein.io>
Thu, 11 Nov 2021 11:48:07 +0000 (12:48 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 11 Nov 2021 12:00:50 +0000 (13:00 +0100)
Use the new `firewall.getZoneColorStyle()` helper to apply background
zone color styles to the interface boxes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 371d82770efd395062635d037eb8c045dd35cbb7..52ad6e9b6f33cb0f897eace25ad72097aecf323a 100644 (file)
@@ -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', {