summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/firewall.js
AgeCommit message (Collapse)Author
2021-11-11luci-base: firewall.js: add getZoneColorStyle() helperJo-Philipp Wich
The getZoneColorStyle() function will produce CSS style properties that describe the color value of the zone. The color declaration is divided into a CSS variable called `--zone-color-rgb` which holds the RGB value of the color and a `background-color` property assigning these values as background property. This allows themes to override the color with derived values, e.g. by applying an alpha channel. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-01luci-base: firewall.js: manage zomne networks as listJo-Philipp Wich
Fixes: #4827 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-11-18luci-base: generalize random color generationAnsuel Smith
Generation of pseudo random hex color from a string can be useful also for other task. Generalize it to make it available also for other purpose. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-05-24luci-base: firewall.js: remove further zone network/name fallback logicJo-Philipp Wich
Fixes: #4093 Fixes: 4052436d8 ("luci-base: firewall.js: don't treat zone name as network fallback") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-04luci-base: firewall.js: fix Zone.addRule()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-28luci-base: firewall.js: gracefully handle missing uci configurationJo-Philipp Wich
Ref: https://forum.openwrt.org/t/luci-rpc-error/61760 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-26luci-base: firewall.js: fix Firewall.removeZone()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-02luci-base: firewall.js: don't treat zone name as network fallbackJo-Philipp Wich
Drop obsolete extra logic which treats the zone name as covered network name in case the network list is unset. This behaviour applied to the pre-fw3 uci firewall, but is not supported since fw3 anymore. Ref: https://forum.openwrt.org/t/luci-zone-creation-bug/55921 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: firewall.js: fix addZone()Jo-Philipp Wich
When checking for an existing zone with the same name internally, addZone() must use the nonblocking lookupZone() instead of the promise returning public getZone() call. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22luci-base: firewall.js: add zone.getDevices() and zone.getSubnets() gettersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07treewide: switch to shared isObject(), toArray() and sortedKeys() helpersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add client-side implementation of luci.model.firewallJo-Philipp Wich
Introduce firewall.js, a client side reimplementation of the luci.model.firewall class. Signed-off-by: Jo-Philipp Wich <jo@mein.io>