treewide: import utility classes explicitly
[project/luci.git] / applications / luci-app-statistics / htdocs / luci-static / resources / view / statistics / plugins / curl.js
1 'use strict';
2 'require baseclass';
3 'require form';
4
5 return baseclass.extend({
6 title: _('cUrl Plugin Configuration'),
7
8 addFormOptions: function(s) {
9 var o, ss;
10
11 o = s.option(form.Flag, 'enable', _('Enable this plugin'));
12
13 o = s.option(form.SectionValue, '__pages', form.TableSection, 'collectd_curl_page');
14 o.title = _('Fetch pages');
15 o.depends('enable', '1');
16
17 ss = o.subsection;
18 ss.anonymous = true;
19 ss.addremove = true;
20
21 o = ss.option(form.Flag, 'enable', _('Enable'));
22 o.default = '1';
23 o.rmempty = false;
24
25 o = ss.option(form.Value, 'name', _('Name'));
26
27 o = ss.option(form.Value, 'url', _('URL'));
28 },
29
30 configSummary: function(section) {
31 return _('cURL plugin enabled');
32 }
33 });