treewide: import utility classes explicitly
[project/luci.git] / applications / luci-app-statistics / htdocs / luci-static / resources / view / statistics / plugins / nut.js
1 'use strict';
2 'require baseclass';
3 'require form';
4
5 return baseclass.extend({
6 title: _('UPS Plugin Configuration'),
7 description: _('The NUT plugin reads information about Uninterruptible Power Supplies.'),
8
9 addFormOptions: function(s) {
10 var o;
11
12 o = s.option(form.Flag, 'enable', _('Enable this plugin'));
13
14 o = s.option(form.Value, 'UPS', _('UPS'), _('UPS name in NUT ups@host format'));
15 },
16
17 configSummary: function(section) {
18 var ups = L.toArray(section.UPS);
19
20 if (ups.length)
21 return N_(ups.length, 'Monitoring one UPS', 'Monitoring %d UPSes').format(ups.length);
22 }
23 });