2020-02-08 21:12:17 +00:00
|
|
|
'use strict';
|
2020-04-03 08:00:06 +00:00
|
|
|
'require baseclass';
|
2020-02-08 21:12:17 +00:00
|
|
|
'require form';
|
|
|
|
|
2020-04-03 08:00:06 +00:00
|
|
|
return baseclass.extend({
|
2020-02-08 21:12:17 +00:00
|
|
|
title: _('CPU Plugin Configuration'),
|
|
|
|
description: _('The cpu plugin collects basic statistics about the processor usage.'),
|
|
|
|
|
|
|
|
addFormOptions: function(s) {
|
|
|
|
var o;
|
|
|
|
|
|
|
|
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
|
|
|
|
|
|
|
|
o = s.option(form.Flag, 'ReportByCpu', _('Report by CPU'),
|
|
|
|
_('By setting this, CPU is not aggregate of all processors on the system'));
|
|
|
|
o.default = '1';
|
2020-02-22 22:26:49 +00:00
|
|
|
o.rmempty = false;
|
2020-02-08 21:12:17 +00:00
|
|
|
o.depends('enable', '1');
|
|
|
|
|
|
|
|
o = s.option(form.Flag, 'ReportByState', _('Report by state'),
|
|
|
|
_('When set to true, reports per-state metric (system, user, idle)'));
|
|
|
|
o.default = '1';
|
2020-02-22 22:26:49 +00:00
|
|
|
o.rmempty = false;
|
2020-02-08 21:12:17 +00:00
|
|
|
o.depends('enable', '1');
|
|
|
|
|
|
|
|
o = s.option(form.Flag, 'ValuesPercentage', _('Report in percent'),
|
|
|
|
_('When set to true, we request percentage values'));
|
|
|
|
o.depends({ 'enable': '1', 'ReportByCpu': '1', 'ReportByState': '1' });
|
|
|
|
},
|
|
|
|
|
|
|
|
configSummary: function(section) {
|
|
|
|
return _('CPU monitoring is enabled');
|
|
|
|
}
|
|
|
|
});
|