summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ledtrig-switch
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-ledtrig-switch')
-rw-r--r--applications/luci-app-ledtrig-switch/Makefile15
-rw-r--r--applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch0.js18
-rw-r--r--applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch1.js18
3 files changed, 51 insertions, 0 deletions
diff --git a/applications/luci-app-ledtrig-switch/Makefile b/applications/luci-app-ledtrig-switch/Makefile
new file mode 100644
index 000000000..7cefc5029
--- /dev/null
+++ b/applications/luci-app-ledtrig-switch/Makefile
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2020 TDT AG <development@tdt.de>
+#
+# This is free software, licensed under the Apache License Version 2.0.
+# See https://www.apache.org/licenses/LICENSE-2.0 for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+LUCI_TITLE:= LuCI Support for ledtrigger switch
+LUCI_PKGARCH:=all
+
+include ../../luci.mk
+
+# call BuildPackage - OpenWrt buildroot signature
diff --git a/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch0.js b/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch0.js
new file mode 100644
index 000000000..2f59866a6
--- /dev/null
+++ b/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch0.js
@@ -0,0 +1,18 @@
+'use strict';
+'require form';
+
+return L.Class.extend({
+ trigger: _('switch0 (kernel)'),
+ kernel: true,
+ addFormOptions(s){
+ var o;
+
+ o = s.option(form.Value, 'port_mask', _('Switch Port Mask'));
+ o.modalonly = true;
+ o.depends('trigger', 'switch0');
+
+ o = s.option(form.Value, 'speed_mask', _('Switch Speed Mask'));
+ o.modalonly = true;
+ o.depends('trigger', 'switch0');
+ }
+});
diff --git a/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch1.js b/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch1.js
new file mode 100644
index 000000000..7800cba22
--- /dev/null
+++ b/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch1.js
@@ -0,0 +1,18 @@
+'use strict';
+'require form';
+
+return L.Class.extend({
+ trigger: _('switch1 (kernel)'),
+ kernel: true,
+ addFormOptions(s){
+ var o;
+
+ o = s.option(form.Value, 'port_mask', _('Switch Port Mask'));
+ o.modalonly = true;
+ o.depends('trigger', 'switch1');
+
+ o = s.option(form.Value, 'speed_mask', _('Switch Speed Mask'));
+ o.modalonly = true;
+ o.depends('trigger', 'switch1');
+ }
+});