summaryrefslogtreecommitdiffstats
path: root/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/args.js
blob: fc268e552189269d8c21145c1d128b9024d6c1a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'use strict';
'require view';
'require form';
'require tools.widgets as widgets';

return view.extend({
	render: function () {
		const m = new form.Map('antiblock', _('AntiBlock'));

		const s = m.section(form.NamedSection, 'config', 'main', _('AntiBlock'));
		s.addremove = true;

		let o = s.option(form.Flag, 'enabled', _('Enabled'));

		o = s.option(form.DynamicList, 'blacklist', _('Blacklist'), _('Prevent adding IP from these subnets to the routing table, optional parameter'));
		o.depends('enabled', '1');

		o = s.option(form.Flag, 'log', _('Log'), _('Show operations log, optional parameter'));
		o.depends('enabled', '1');

		o = s.option(form.Flag, 'stat', _('Statistics'), _('Show statistics data, optional parameter'));
		o.depends('enabled', '1');

		return m.render();
	},
});