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