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

return baseclass.extend({
	title: _('cUrl Plugin Configuration'),

	addFormOptions(s) {
		let 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(section) {
		return _('cURL plugin enabled');
	}
});