17ec51be5379ec7742070a7f3a964220c4ebaec7
5 return baseclass
.extend({
6 title
: _('APCUPS Plugin Configuration'),
7 description
: _('The APCUPS plugin collects statistics about the APC UPS.'),
9 addFormOptions: function(s
) {
12 o
= s
.option(form
.Flag
, 'enable', _('Enable this plugin'));
14 o
= s
.option(form
.DynamicList
, 'Host', _('Monitor host'));
15 o
.default = 'localhost';
17 o
.depends('enable', '1');
18 o
.write = function(section_id
, value
) {
19 return form
.Value
.prototype.write
.call(this, section_id
, L
.toArray(value
).join(' '));
22 o
= s
.option(form
.Value
, 'Port', _('Port for apcupsd communication'));
25 o
.depends('enable', '1');
28 configSummary: function(section
) {
29 var hosts
= L
.toArray(section
.Host
);
31 return N_(hosts
.length
,
32 'Monitoring APC UPS at host %s, port %d',
33 'Monitoring APC UPS at hosts %s, port %d'
34 ).format(hosts
.join(', '), section
.Port
|| 3551);