From b40a84fb605686723327518cd8666a842fa93621 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sat, 6 Feb 2021 22:01:02 +0100 Subject: luci-app-banip: sync with banIP 0.7.1 * sync with current banIP release * expose 'ban_localsources' and 'ban_extrasources' to LuCI * expose IPSet timeout settings for local sources to LuCI * sync translations Signed-off-by: Dirk Brenken --- .../luci-static/resources/view/banip/overview.js | 44 ++++++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) (limited to 'applications/luci-app-banip/htdocs') diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js index 9196e295a1..e967d529e6 100644 --- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js +++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js @@ -490,11 +490,35 @@ return view.extend({ o = s.taboption('adv_chain', form.DummyValue, '_sub'); o.rawhtml = true; - o.default = 'Individual IPSet Types'; + o.default = 'Individual IPSet Settings'; + + o = s.taboption('adv_chain', form.ListValue, 'ban_maclist_timeout', _('Maclist Timeout'), _('Set the maclist IPSet timeout.')); + o.value('1800', _('30 minutes')); + o.value('3600', _('1 hour')); + o.value('21600', _('6 hours')); + o.value('43200', _('12 hours')); + o.value('86400', _('24 hours')); + o.optional = true; + o.rmempty = true; + + o = s.taboption('adv_chain', form.ListValue, 'ban_whitelist_timeout', _('Whitelist Timeout'), _('Set the whitelist IPSet timeout.')); + o.value('1800', _('30 minutes')); + o.value('3600', _('1 hour')); + o.value('21600', _('6 hours')); + o.value('43200', _('12 hours')); + o.value('86400', _('24 hours')); + o.optional = true; + o.rmempty = true; + + o = s.taboption('adv_chain', form.ListValue, 'ban_blacklist_timeout', _('Blacklist Timeout'), _('Set the blacklist IPSet timeout.')); + o.value('1800', _('30 minutes')); + o.value('3600', _('1 hour')); + o.value('21600', _('6 hours')); + o.value('43200', _('12 hours')); + o.value('86400', _('24 hours')); + o.optional = true; + o.rmempty = true; - /* - prepare source data - */ var info, source, sources = []; if (result[0]) { sources = result[0].trim().split('\n'); @@ -754,6 +778,18 @@ return view.extend({ o.rawhtml = true; o.default = 'Local Sources'; + o = s.taboption('sources', form.MultiValue, 'ban_localsources', _('Local Sources'), _('Limit the selection to certain local sources.')); + o.value('maclist'); + o.value('whitelist'); + o.value('blacklist'); + o.optional = true; + o.rmempty = true; + + o = s.taboption('sources', form.DynamicList, 'ban_extrasources', _('Extra Sources'), _('Add additional, non-banIP related IPSets e.g. for reporting and queries.')); + o.datatype = 'uciname'; + o.optional = true; + o.rmempty = true; + o = s.taboption('sources', form.Flag, 'ban_autoblacklist', _('Auto Blacklist'), _('Automatically transfers suspicious IPs from the log to the banIP blacklist during runtime.')); o.rmempty = false; -- cgit v1.2.3