luci-mod-system: add missing require to `none` led trigger class
authorJo-Philipp Wich <jo@mein.io>
Sun, 31 Oct 2021 21:26:42 +0000 (22:26 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 31 Oct 2021 21:27:46 +0000 (22:27 +0100)
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>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js
modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/heartbeat.js
modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/netdev.js
modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js
modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/timer.js

index 2de2743e4cca5f1e5da1e3f8db5a7ef09c6198ae..73263b8b0ebf6d4208fe483abfc8007dd07e473f 100644 (file)
@@ -1,12 +1,9 @@
 'use strict';
 'require baseclass';
-'require form';
 
 return baseclass.extend({
        trigger: _('Always on (kernel: default-on)'),
        description: _('The LED is always in default state on.'),
        kernel: true,
-       addFormOptions(s){
-               var o;
-       }
+       addFormOptions: function(s) {}
 });
index 1a6eeebd2c4dfb1f9b6b60a82e96e660ed81e1dc..49744ed42ae339fe9a511311340c548df7cabfaa 100644 (file)
@@ -6,7 +6,5 @@ return baseclass.extend({
        description: _('The LED flashes to simulate actual heart beat.') +
                _('The frequency is in direct proportion to 1-minute average CPU load.'),
        kernel: true,
-       addFormOptions(s){
-               var o;
-       }
+       addFormOptions: function(s) {}
 });
index af70f449d2e1142d93d9dfb4dce575f6769bdb80..382705203b9442ca7989f3900549707b4f6b5045 100644 (file)
@@ -7,7 +7,7 @@ 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(s){
+       addFormOptions: function(s) {
                var o;
 
                o = s.option(widgets.DeviceSelect, '_net_dev', _('Device'));
index 4b96cf087a200084e62799e29964852fa8e48da3..a68ab5a004b1bc49710752c54c732f93d2efde35 100644 (file)
@@ -1,11 +1,12 @@
 '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(s){
+       addFormOptions: function(s) {
                var o;
 
                o = s.option(form.Flag, 'default', _('Default state'));
index 6213604a1a200aeaf43c4c590d89a08fbbc6709f..c2f20f2c971f5396056fd0ddce1c752c28da8fc4 100644 (file)
@@ -6,7 +6,7 @@ return baseclass.extend({
        trigger: _('Custom flash interval (kernel: timer)'),
        description: _('The LED blinks with the configured on/off frequency'),
        kernel: true,
-       addFormOptions(s){
+       addFormOptions: function(s) {
                var o;
 
                o = s.option(form.Value, 'delayon', _('On-State Delay'),