luci/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/curl.js
Jo-Philipp Wich d4a475163e luci-app-statistics: clean and fix plugin configurations
- Remove redundant form flags
 - Fix various default values
 - Add some new collect options and remove options that do not exist anymore

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-22 23:26:49 +01:00

32 lines
688 B
JavaScript

'use strict';
'require form';
return L.Class.extend({
title: _('cUrl Plugin Configuration'),
addFormOptions: function(s) {
var o, ss;
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
o = s.option(form.SectionValue, '__pages', form.TableSection, 'collectd_curl_page');
o.title = _('Fetch pages');
o.depends('enable', '1');
ss = o.subsection;
ss.anonymous = true;
ss.addremove = true;
o = ss.option(form.Flag, 'enable', _('Enable'));
o.default = '1';
o.rmempty = false;
o = ss.option(form.Value, 'name', _('Name'));
o = ss.option(form.Value, 'url', _('URL'));
},
configSummary: function(section) {
return _('cURL plugin enabled');
}
});