Also convert ES6 to ES5 syntax while we're at it.
Fixes: #5476
Fixes: 5b42cd5b46
("luci-mod-system: move default option from defaul-on trigger to none trigger")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
28 lines
746 B
JavaScript
28 lines
746 B
JavaScript
'use strict';
|
|
'require baseclass';
|
|
'require form';
|
|
'require tools.widgets as widgets';
|
|
|
|
return baseclass.extend({
|
|
trigger: _("Network device activity (kernel: netdev)"),
|
|
description: _('The LED flashes with link status and activity on the configured interface.'),
|
|
kernel: true,
|
|
addFormOptions: function(s) {
|
|
var o;
|
|
|
|
o = s.option(widgets.DeviceSelect, '_net_dev', _('Device'));
|
|
o.rmempty = true;
|
|
o.ucioption = 'dev';
|
|
o.modalonly = true;
|
|
o.noaliases = true;
|
|
o.depends('trigger', 'netdev');
|
|
|
|
o = s.option(form.MultiValue, 'mode', _('Trigger Mode'));
|
|
o.rmempty = true;
|
|
o.modalonly = true;
|
|
o.depends('trigger', 'netdev');
|
|
o.value('link', _('Link On'));
|
|
o.value('tx', _('Transmit'));
|
|
o.value('rx', _('Receive'));
|
|
}
|
|
});
|