27b08cf3935ed642bc6ac5283c1b474b58a0f9e7
3 'require tools.widgets as widgets';
5 return L
.Class
.extend({
6 title
: _('DNS Plugin Configuration'),
7 description
: _('The dns plugin collects detailed statistics about dns related traffic on selected interfaces.'),
9 addFormOptions: function(s
) {
12 o
= s
.option(form
.Flag
, 'enable', _('Enable this plugin'));
14 o
= s
.option(widgets
.DeviceSelect
, 'Interfaces', _('Monitor interfaces'),
15 _('When none selected, all interfaces will be monitored.'));
18 o
.depends('enable', '1');
20 o
= s
.option(form
.DynamicList
, 'IgnoreSources', _('Ignore source addresses'));
21 o
.datatype
= 'ipaddr("nomask")';
22 o
.default = '127.0.0.1';
23 o
.depends('enable', '1');
26 configSummary: function(section
) {
27 var ifaces
= L
.toArray(section
.Interfaces
);
29 if (ifaces
.length
== 0)
30 return _('Monitoring DNS queries on all interfaces');
32 return N_(ifaces
.length
, 'Monitoring DNS queries on one interface', 'Monitoring DNS queries on %d interfaces').format(ifaces
.length
);