summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system/htdocs/luci-static/resources/view/system
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-10-31 22:26:42 +0100
committerJo-Philipp Wich <jo@mein.io>2021-10-31 22:27:46 +0100
commitfceabd74465f2aafc40edc084429f30837deff2c (patch)
tree2f6202125fe66482366a190a133d215863ac81c6 /modules/luci-mod-system/htdocs/luci-static/resources/view/system
parent30e32071c3dd29f691dc5770c8e2253d9fdd968e (diff)
luci-mod-system: add missing require to `none` led trigger class
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>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static/resources/view/system')
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js5
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/heartbeat.js4
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/netdev.js2
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js3
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/timer.js2
5 files changed, 6 insertions, 10 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js
index 2de2743e4c..73263b8b0e 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js
@@ -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) {}
});
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 1a6eeebd2c..49744ed42a 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
@@ -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) {}
});
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/netdev.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/netdev.js
index af70f449d2..382705203b 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/netdev.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/netdev.js
@@ -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'));
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js
index 4b96cf087a..a68ab5a004 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js
@@ -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'));
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/timer.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/timer.js
index 6213604a1a..c2f20f2c97 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/timer.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/timer.js
@@ -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'),