4 'require tools.widgets as widgets';
6 return baseclass
.extend({
7 title
: _('DNS Plugin Configuration'),
8 description
: _('The dns plugin collects detailed statistics about dns related traffic on selected interfaces.'),
10 addFormOptions: function(s
) {
13 o
= s
.option(form
.Flag
, 'enable', _('Enable this plugin'));
15 o
= s
.option(widgets
.DeviceSelect
, 'Interfaces', _('Monitor interfaces'),
16 _('When none selected, all interfaces will be monitored.'));
19 o
.depends('enable', '1');
21 o
= s
.option(form
.DynamicList
, 'IgnoreSources', _('Ignore source addresses'));
22 o
.datatype
= 'ipaddr("nomask")';
23 o
.default = '127.0.0.1';
24 o
.depends('enable', '1');
27 configSummary: function(section
) {
28 var ifaces
= L
.toArray(section
.Interfaces
);
30 if (ifaces
.length
== 0)
31 return _('Monitoring DNS queries on all interfaces');
33 return N_(ifaces
.length
, 'Monitoring DNS queries on one interface', 'Monitoring DNS queries on %d interfaces').format(ifaces
.length
);