From 8eb8b22a568e5c5f4b0e405e3117cc1496e20941 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 29 Oct 2024 09:53:24 +0100 Subject: [PATCH] Add Proxy/VPN status report via Led --- .../resources/view/system/led-trigger/proxy.js | 18 ++++++++++++++++++ .../resources/view/system/led-trigger/vpn.js | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 luci-app-openmptcprouter/htdocs/luci-static/resources/view/system/led-trigger/proxy.js create mode 100644 luci-app-openmptcprouter/htdocs/luci-static/resources/view/system/led-trigger/vpn.js diff --git a/luci-app-openmptcprouter/htdocs/luci-static/resources/view/system/led-trigger/proxy.js b/luci-app-openmptcprouter/htdocs/luci-static/resources/view/system/led-trigger/proxy.js new file mode 100644 index 000000000..d7b9300b6 --- /dev/null +++ b/luci-app-openmptcprouter/htdocs/luci-static/resources/view/system/led-trigger/proxy.js @@ -0,0 +1,18 @@ +'use strict'; +'require baseclass'; +'require form'; + +return baseclass.extend({ + trigger: _('Proxy status (service: proxy)'), + kernel: false, + addFormOptions: function(s){ + var o; + + o = s.option(form.ListValue, 'proxy_status', _('Proxy Status')); + o.rmempty = true; + o.modalonly = true; + o.value('up', _('Up')); + o.value('down', _('Down')); + o.depends('trigger','proxy'); + } +}); diff --git a/luci-app-openmptcprouter/htdocs/luci-static/resources/view/system/led-trigger/vpn.js b/luci-app-openmptcprouter/htdocs/luci-static/resources/view/system/led-trigger/vpn.js new file mode 100644 index 000000000..85f28a8a2 --- /dev/null +++ b/luci-app-openmptcprouter/htdocs/luci-static/resources/view/system/led-trigger/vpn.js @@ -0,0 +1,18 @@ +'use strict'; +'require baseclass'; +'require form'; + +return baseclass.extend({ + trigger: _('VPN status (service: vpn)'), + kernel: false, + addFormOptions: function(s){ + var o; + + o = s.option(form.ListValue, 'vpn_status', _('VPN Status')); + o.rmempty = true; + o.modalonly = true; + o.value('up', _('Up')); + o.value('down', _('Down')); + o.depends('trigger','vpn'); + } +});