This commit creates the possibility that not only kernel-led-triggers can
be selected but also application-led-triggers from user space.
This is done via a plugin mechanism. The application-led-triggers are scripts
that set kernel-led-triggers on system events or services. Until now this
has not been possible. The package rssileds is a kind of
application-led-trigger.
The following new packages are added:
* luci-app-ledtrig-rssi (application-led-trigger)
* luci-app-ledtrig-switch (kernel-led-trigger) not needed on every most devices
* luci-app-ledtrig-usport (kernel-led-trigger) optional trigger
Since we have now a plugin mechanism I have added the following triggers
as a dependency. So this triggers are now installed per default on LuCI
installation.
* kmod-ledtrig-default-on
* kmod-ledtrig-heartbeat
* kmod-ledtrig-netdev
* kmod-ledtrig-timer
The kernel trigger kmod-ledtrig-usbdev was removed with the commit
d0b50c2770
So I have not ported the relevant code anymore.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
38 lines
901 B
JavaScript
38 lines
901 B
JavaScript
'use strict';
|
|
'require form';
|
|
'require tools.widgets as widgets';
|
|
|
|
return L.Class.extend({
|
|
trigger: _('rssi (service)'),
|
|
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');
|
|
}
|
|
});
|