summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js
diff options
context:
space:
mode:
authorSergey Ponomarev <stokito@gmail.com>2024-04-27 17:54:07 +0300
committerSergey Ponomarev <stokito@gmail.com>2024-04-30 11:59:22 +0300
commitf51f8f3d80eb9752fcedd1347538a0d153cd54b3 (patch)
tree1f4b0f9137d70e968e14f9e86decefa4e79ee9e6 /applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js
parent2a3181782e2ce2840f41eb25b05f3f05310ef8bc (diff)
luci-app-banip: untranslate numbers and use o.default
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Diffstat (limited to 'applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js')
-rw-r--r--applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js94
1 files changed, 53 insertions, 41 deletions
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 8027bb9a53..19543fe216 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
@@ -319,11 +319,12 @@ return view.extend({
o.rmempty = true;
o = s.taboption('general', form.ListValue, 'ban_fetchretry', _('Download Retries'), _('Number of download attempts in case of an error (not supported by uclient-fetch).'));
- o.value('1', _('1'));
- o.value('3', _('3'));
- o.value('5', _('5 (default)'));
- o.value('10', _('10'));
- o.value('20', _('20'));
+ o.value('1', '1');
+ o.value('3', '3');
+ o.value('5', '5');
+ o.value('10', '10');
+ o.value('20', '20');
+ o.default = '5';
o.optional = true;
o.rmempty = true;
@@ -340,17 +341,19 @@ return view.extend({
o = s.taboption('advanced', form.ListValue, 'ban_nicelimit', _('Nice Level'), _('The selected priority will be used for banIP background processing.'));
o.value('-20', _('Highest Priority'));
o.value('-10', _('High Priority'));
- o.value('0', _('Normal Priority (default)'));
+ o.value('0', _('Normal Priority'));
o.value('10', _('Less Priority'));
o.value('19', _('Least Priority'));
+ o.default = '0';
o.optional = true;
o.rmempty = true;
o = s.taboption('advanced', form.ListValue, 'ban_filelimit', _('Max Open Files'), _('Increase the maximal number of open files, e.g. to handle the amount of temporary split files while loading the Sets.'));
- o.value('512', _('512'));
- o.value('1024', _('1024 (default)'));
- o.value('2048', _('2048'));
- o.value('4096', _('4096'));
+ o.value('512', '512');
+ o.value('1024', '1024');
+ o.value('2048', '2048');
+ o.value('4096', '4096');
+ o.default = '1024';
o.optional = true;
o.rmempty = true;
@@ -401,10 +404,11 @@ return view.extend({
o.default = '<em style="color:#37c;font-weight:bold;">' + _('Changes on this tab needs a banIP service restart to take effect.') + '</em>';
o = s.taboption('adv_chain', form.ListValue, 'ban_nftpriority', _('Chain Priority'), _('Set the nft chain priority within the banIP table, lower values means higher priority.'));
- o.value('0', _('0'));
- o.value('-100', _('-100 (default)'));
- o.value('-150', _('-150'));
- o.value('-200', _('-200'));
+ o.value('0', '0');
+ o.value('-100', '-100');
+ o.value('-150', '-150');
+ o.value('-200', '-200');
+ o.default = '100';
o.optional = true;
o.rmempty = true;
@@ -425,32 +429,35 @@ return view.extend({
o.rmempty = true;
o = s.taboption('adv_chain', form.ListValue, 'ban_icmplimit', _('ICMP-Treshold'), _('ICMP-Treshold in packets per second to prevent WAN-DDoS attacks.'));
- o.value('1', _('1'));
- o.value('10', _('10 (default)'));
- o.value('50', _('50'));
- o.value('100', _('100'));
- o.value('250', _('250'));
- o.value('500', _('500'));
+ o.value('1', '1');
+ o.value('10', '10');
+ o.value('50', '50');
+ o.value('100', '100');
+ o.value('250', '250');
+ o.value('500', '500');
+ o.default = '10';
o.optional = true;
o.rmempty = true;
o = s.taboption('adv_chain', form.ListValue, 'ban_synlimit', _('SYN-Treshold'), _('SYN-Treshold in packets per second to prevent WAN-DDoS attacks.'));
- o.value('1', _('1'));
- o.value('10', _('10 (default)'));
- o.value('50', _('50'));
- o.value('100', _('100'));
- o.value('250', _('250'));
- o.value('500', _('500'));
+ o.value('1', '1');
+ o.value('10', '10');
+ o.value('50', '50');
+ o.value('100', '100');
+ o.value('250', '250');
+ o.value('500', '500');
+ o.default = '10';
o.optional = true;
o.rmempty = true;
o = s.taboption('adv_chain', form.ListValue, 'ban_udplimit', _('UDP-Treshold'), _('UDP-Treshold in packets per second to prevent WAN-DDoS attacks.'));
- o.value('1', _('1'));
- o.value('10', _('10'));
- o.value('50', _('50'));
- o.value('100', _('100 (default)'));
- o.value('250', _('250'));
- o.value('500', _('500'));
+ o.value('1', '1');
+ o.value('10', '10');
+ o.value('50', '50');
+ o.value('100', '100');
+ o.value('250', '250');
+ o.value('500', '500');
+ o.default = '100';
o.optional = true;
o.rmempty = true;
@@ -462,14 +469,16 @@ return view.extend({
o.default = '<em style="color:#37c;font-weight:bold;">' + _('Changes on this tab needs a banIP service restart to take effect.') + '</em>';
o = s.taboption('adv_set', form.ListValue, 'ban_nftpolicy', _('Set Policy'), _('Set the nft policy for banIP-related Sets.'));
- o.value('memory', _('memory (default)'));
+ o.value('memory', _('memory'));
o.value('performance', _('performance'));
+ o.default = 'memory';
o.optional = true;
o.rmempty = true;
o = s.taboption('adv_set', form.ListValue, 'ban_blocktype', _('Block Type'), _('Drop packets silently or actively reject the traffic on WAN-Input and WAN-Forward chains.'));
- o.value('drop', _('drop (default)'));
+ o.value('drop', _('drop'));
o.value('reject', _('reject'));
+ o.default = 'drop';
o.optional = true;
o.rmempty = true;
@@ -540,10 +549,11 @@ return view.extend({
o.value('alert', _('alert'));
o.value('crit', _('crit'));
o.value('err', _('err'));
- o.value('warn', _('warn (default)'));
+ o.value('warn', _('warn'));
o.value('notice', _('notice'));
o.value('info', _('info'));
o.value('debug', _('debug'));
+ o.default = 'warn';
o.optional = true;
o.rmempty = true;
@@ -565,11 +575,12 @@ return view.extend({
o = s.taboption('adv_log', form.ListValue, 'ban_loglimit', _('Log Limit'), _('Parse only the last stated number of log entries for suspicious events. To disable the log monitor at all set it to \'0\'.'));
o.value('0', _('0 (disable)'));
- o.value('50', _('50'));
- o.value('100', _('100 (default)'));
- o.value('250', _('250'));
- o.value('500', _('500'));
- o.value('1000', _('1000'));
+ o.value('50', '50');
+ o.value('100', '100');
+ o.value('250', '250');
+ o.value('500', '500');
+ o.value('1000', '1000');
+ o.default = '100';
o.optional = true;
o.rmempty = true;
@@ -722,8 +733,9 @@ return view.extend({
o = s.taboption('feeds', form.ListValue, 'ban_autoallowuplink', _('Auto Allow Uplink'), _('Limit the uplink autoallow function.'));
o.depends('ban_autoallowlist', '1');
o.value('disable', _('Disable'));
- o.value('subnet', _('Subnet (default)'));
+ o.value('subnet', _('Subnet'));
o.value('ip', _('IP'));
+ o.default = 'subnet';
o.optional = true;
o.rmempty = true;