0
0
mirror of https://github.com/openwrt/luci.git synced 2025-02-14 14:58:09 +00:00
Jo-Philipp Wich 3c4bc228a1 treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-03 10:00:06 +02:00

24 lines
589 B
JavaScript

'use strict';
'require baseclass';
'require form';
return baseclass.extend({
title: _('UPS Plugin Configuration'),
description: _('The NUT plugin reads information about Uninterruptible Power Supplies.'),
addFormOptions: function(s) {
var o;
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
o = s.option(form.Value, 'UPS', _('UPS'), _('UPS name in NUT ups@host format'));
},
configSummary: function(section) {
var ups = L.toArray(section.UPS);
if (ups.length)
return N_(ups.length, 'Monitoring one UPS', 'Monitoring %d UPSes').format(ups.length);
}
});