luci/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/nut.js
Jo-Philipp Wich d4a475163e luci-app-statistics: clean and fix plugin configurations
- Remove redundant form flags
 - Fix various default values
 - Add some new collect options and remove options that do not exist anymore

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-22 23:26:49 +01:00

22 lines
566 B
JavaScript

'use strict';
'require form';
return L.Class.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);
}
});