mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 20:43:56 +08:00
⛄ Sync 2026-04-23 20:32:35
This commit is contained in:
1 parent
17738c6f79
commit
fe51d2b304
206 files changed
+725671
No files matched your search
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
'require baseclass';
|
||||
|
||||
return baseclass.extend({
|
||||
trigger: _('Always on (kernel: default-on)'),
|
||||
description: _('The LED is always in default state on.'),
|
||||
kernel: true,
|
||||
addFormOptions: function(s) {}
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
'require baseclass';
|
||||
'require form';
|
||||
|
||||
return baseclass.extend({
|
||||
trigger: _('Heartbeat interval (kernel: heartbeat)'),
|
||||
description: _('The LED flashes to simulate actual heart beat.') +
|
||||
_('The frequency is in direct proportion to 1-minute average CPU load.'),
|
||||
kernel: true,
|
||||
addFormOptions: function(s) {
|
||||
var o;
|
||||
|
||||
o = s.option(form.Flag, 'inverted', _('Invert blinking'),
|
||||
_('When inverted, the LED is continuously lit and flickers instead of it being off by default and blinking on system activity.'));
|
||||
o.rmempty = true;
|
||||
o.modalonly = true;
|
||||
o.depends('trigger', 'heartbeat');
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,36 @@
|
||||
'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('link_10', _('Link 10M On'));
|
||||
o.value('link_100', _('Link 100M On'));
|
||||
o.value('link_1000', _('Link 1G On'));
|
||||
o.value('link_2500', _('Link 2.5G On'));
|
||||
o.value('link_5000', _('Link 5G On'));
|
||||
o.value('link_10000', _('Link 10G On'));
|
||||
o.value('half_duplex', _('Half Duplex'));
|
||||
o.value('full_duplex', _('Full Duplex'));
|
||||
o.value('tx', _('Transmit'));
|
||||
o.value('rx', _('Receive'));
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
'require form';
|
||||
'require baseclass';
|
||||
|
||||
return baseclass.extend({
|
||||
trigger: _('Always off (kernel: none)'),
|
||||
description: _('The LED is always in default state off.'),
|
||||
kernel: true,
|
||||
addFormOptions: function(s) {
|
||||
var o;
|
||||
|
||||
o = s.option(form.Flag, 'default', _('Default state'));
|
||||
o.rmempty = false;
|
||||
o.depends('trigger', 'none');
|
||||
o.textvalue = function(section_id) {
|
||||
var cval = this.cfgvalue(section_id);
|
||||
if (cval == null)
|
||||
cval = this.default;
|
||||
return (cval == this.enabled) ? _('On') : _('Off');
|
||||
};
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
'require baseclass';
|
||||
'require form';
|
||||
|
||||
return baseclass.extend({
|
||||
trigger: _('Custom flash interval (kernel: timer)'),
|
||||
description: _('The LED blinks with the configured on/off frequency'),
|
||||
kernel: true,
|
||||
addFormOptions: function(s) {
|
||||
var o;
|
||||
|
||||
o = s.option(form.Value, 'delayon', _('On-State Delay'),
|
||||
_('How long (in milliseconds) the LED should be on')
|
||||
);
|
||||
o.modalonly = true;
|
||||
o.depends('trigger', 'timer');
|
||||
|
||||
o = s.option(form.Value, 'delayoff', _('Off-State Delay'),
|
||||
_('How long (in milliseconds) the LED should be off')
|
||||
);
|
||||
o.modalonly = true;
|
||||
o.depends('trigger', 'timer');
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user