summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ledtrig-rssi/htdocs/luci-static/resources/view/system/led-trigger/rssi.js
blob: 7068ccf3365a46c2a0baf8b26e6534a7c1c0d72b (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
34
35
36
37
38
39
'use strict';
'require baseclass';
'require form';
'require tools.widgets as widgets';

return baseclass.extend({
	trigger: _('WiFi signal quality (service: rssileds)'),
	kernel: false,
	addFormOptions(s){
		var o;

		o = s.option(widgets.DeviceSelect, '_rssi_iface', _('Device'));
		o.rmempty = true;
		o.ucioption = 'iface';
		o.modalonly = true;
		o.noaliases = true;
		o.depends('trigger', 'rssi');

		o = s.option(form.Value, 'minq', _('Minimal quality'));
		o.rmempty = true;
		o.modalonly = true;
		o.depends('trigger', 'rssi');

		o = s.option(form.Value, 'maxq', _('Maximal quality'));
		o.rmempty = true;
		o.modalonly = true;
		o.depends('trigger', 'rssi');

		o = s.option(form.Value, 'offset', _('Value offset'));
		o.rmempty = true;
		o.modalonly = true;
		o.depends('trigger', 'rssi');

		o = s.option(form.Value, 'factor', _('Multiplication factor'));
		o.rmempty = true;
		o.modalonly = true;
		o.depends('trigger', 'rssi');
	}
});