luci-app-statistics: treat APC UPS "host" setting as single value option
[project/luci.git] / applications / luci-app-statistics / htdocs / luci-static / resources / view / statistics / plugins / csv.js
1 'use strict';
2 'require baseclass';
3 'require form';
4
5 return baseclass.extend({
6 title: _('CSV Plugin Configuration'),
7 description: _('The csv plugin stores collected data in csv file format for further processing by external programs.'),
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.Value, 'DataDir', _('Storage directory for the csv files'));
15 o.default = '/tmp/csv';
16 o.depends('enable', '1');
17
18 o = s.option(form.Flag, 'StoreRates', _('Store data values as rates instead of absolute values'));
19 o.depends('enable', '1');
20 },
21
22 configSummary: function(section) {
23 if (section.DataDir)
24 return _('Storing CSV data in %s').format(section.DataDir);
25 }
26 });