luci-app-firewall: rework rule descriptions, deduplicate code
authorJo-Philipp Wich <jo@mein.io>
Sun, 19 Jan 2020 15:08:47 +0000 (16:08 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 28 Jan 2020 17:34:01 +0000 (18:34 +0100)
commit03a8ea4edb8cb20ad31d31d6cc851e624daa6321
treea0cdab9c7481b06317ef3c0c592fcc2cd5b53d41
parent3b60ada020ec45b30cf42199f32ae9fead171cfd
luci-app-firewall: rework rule descriptions, deduplicate code

Use a simple custom format string DSL to assemble the rule description
texts in the overview page.

Also move common code for shared, complex cbi options to the firewall
tool class.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 7944b0a90bbb0f0f5d1da5eaf5d9906ac546c44b)
applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js