b4f170c8a721883112e990c6913d85818a1759e7
4 return L
.Class
.extend({
5 title
: _('APCUPS Plugin Configuration'),
6 description
: _('The APCUPS plugin collects statistics about the APC UPS.'),
8 addFormOptions: function(s
) {
11 o
= s
.option(form
.Flag
, 'enable', _('Enable this plugin'));
13 o
= s
.option(form
.DynamicList
, 'Host', _('Monitor host'));
14 o
.default = 'localhost';
16 o
.depends('enable', '1');
18 o
= s
.option(form
.Value
, 'Port', _('Port for apcupsd communication'));
21 o
.depends('enable', '1');
24 configSummary: function(section
) {
25 var hosts
= L
.toArray(section
.Host
);
27 return N_(hosts
.length
,
28 'Monitoring APC UPS at host %s, port %d',
29 'Monitoring APC UPS at hosts %s, port %d'
30 ).format(hosts
.join(', '), section
.Port
|| 3551);