diff options
author | Florian Eckert <fe@dev.tdt.de> | 2022-08-08 08:45:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 08:45:20 +0200 |
commit | 1a3a1c6522231e38d8b295d55beb6c81b66d64c8 (patch) | |
tree | eb0e76d69e0ddfcbbbdf52b28da61b700bbda9f4 | |
parent | 01dec989914e53d1e728e97f2b5a5cddd9a62cdb (diff) | |
parent | d4330a53ee10b0300f540a9b1186e4751993fdc1 (diff) |
Merge pull request #5923 from TDT-AG/pr/20220803-luci-mod-system
luci-mod-system: add config option to invert heartbeat trigger
-rw-r--r-- | modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/heartbeat.js | 11 |
1 files changed, 10 insertions, 1 deletions
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'); + } }); |