Merge pull request #3639 from TDT-AG/pr/20200217-leds
[project/luci.git] / applications / luci-app-statistics / htdocs / luci-static / resources / view / statistics / plugins / cpu.js
1 'use strict';
2 'require form';
3
4 return L.Class.extend({
5 title: _('CPU Plugin Configuration'),
6 description: _('The cpu plugin collects basic statistics about the processor usage.'),
7
8 addFormOptions: function(s) {
9 var o;
10
11 o = s.option(form.Flag, 'enable', _('Enable this plugin'));
12
13 o = s.option(form.Flag, 'ReportByCpu', _('Report by CPU'),
14 _('By setting this, CPU is not aggregate of all processors on the system'));
15 o.default = '1';
16 o.rmempty = false;
17 o.depends('enable', '1');
18
19 o = s.option(form.Flag, 'ReportByState', _('Report by state'),
20 _('When set to true, reports per-state metric (system, user, idle)'));
21 o.default = '1';
22 o.rmempty = false;
23 o.depends('enable', '1');
24
25 o = s.option(form.Flag, 'ValuesPercentage', _('Report in percent'),
26 _('When set to true, we request percentage values'));
27 o.depends({ 'enable': '1', 'ReportByCpu': '1', 'ReportByState': '1' });
28 },
29
30 configSummary: function(section) {
31 return _('CPU monitoring is enabled');
32 }
33 });