summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-apinger/htdocs/luci-static/resources/view/apinger/interfaces.js
blob: 5f53b27639e8cfaf8d3e7afab502117c440050cc (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
'use strict';
'require view';
'require form';

return view.extend({
	render: function() {
		var m, s, o;

		m = new form.Map('apinger', _('Apinger - Interfaces'),
			_('Names must match the interface name found in /etc/config/network.'));

		s = m.section(form.GridSection, 'interface');
		s.anonymous = false;
		s.addremove = true;
		s.addbtntitle = _('Add Interface Instance');

		o = s.option(form.Flag, 'debug', _('Debug'));
		o.datatype = 'boolean';
		o.default = false;

		o = s.option(form.Value, 'status_interval', _('Status Update Interval'));
		o.datatype = 'range(1-60)';
		o.default = '5';

		o = s.option(form.Value, 'rrd_interval', _('RRD Collection Interval'));
		o.datatype = 'range(15-60)';
		o.default = '30';

		return m.render();
	},
});