summaryrefslogtreecommitdiffstats
path: root/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/memory.js
blob: f2456de64250627e1bbfab31e737ace438a8f051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'use strict';
'require baseclass';
'require form';

return baseclass.extend({
	title: _('Memory Plugin Configuration'),
	description: _('The memory plugin collects statistics about the memory usage.'),

	addFormOptions(s) {
		let o;

		o = s.option(form.Flag, 'enable', _('Enable this plugin'));

		o = s.option(form.Flag, 'HideFree', _('Hide free memory'),
			_('Hiding the free memory item makes the graph to scale to actual memory usage, not to 100%.'));
		o.default = '0';
		o.rmempty = false;

		o = s.option(form.Flag, 'ValuesAbsolute', _('Absolute values'), _('When set to true, we request absolute values'));
		o.default = '1';
		o.depends('enable', '1');

		o = s.option(form.Flag, 'ValuesPercentage', _('Percent values'), _('When set to true, we request percentage values'));
		o.depends('enable', '1');
	},

	configSummary(section) {
		return _('Memory monitoring enabled');
	}
});