From: Florian Eckert Date: Wed, 3 Aug 2022 11:21:14 +0000 (+0200) Subject: luci-mod-system: add config option to invert heartbeat trigger X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d4330a53ee10b0300f540a9b1186e4751993fdc1;p=project%2Fluci.git luci-mod-system: add config option to invert heartbeat trigger Signed-off-by: Florian Eckert --- diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/heartbeat.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/heartbeat.js index 49744ed42a..4a093ffed5 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/heartbeat.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/heartbeat.js @@ -1,10 +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) {} + 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'); + } });