summaryrefslogtreecommitdiffstats
path: root/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/csv.js
blob: 16c871e2c5541eee4136fecefcaf840d67a10d27 (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
'use strict';
'require baseclass';
'require form';

return baseclass.extend({
	title: _('CSV Plugin Configuration'),
	description: _('The csv plugin stores collected data in csv file format for further processing by external programs.'),

	addFormOptions(s) {
		let o;

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

		o = s.option(form.Value, 'DataDir', _('Storage directory for the csv files'));
		o.default = '/tmp/csv';
		o.depends('enable', '1');

		o = s.option(form.Flag, 'StoreRates', _('Store data values as rates instead of absolute values'));
		o.depends('enable', '1');
	},

	configSummary(section) {
		if (section.DataDir)
			return _('Storing CSV data in %s').format(section.DataDir);
	}
});