From 5a81e4f6c1d556de3d7fbdabfc68ba6a1429dcfc Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Wed, 13 Nov 2019 04:25:53 -0700 Subject: luci-app-https_dns_proxy: remove dnsmasq integration, better service controls, providers as plugins, misc fixes Signed-off-by: Stan Grishin --- .../luasrc/view/https_dns_proxy/buttons.htm | 56 ++++++++++++++++++++ .../luasrc/view/https_dns_proxy/css.htm | 9 ++++ .../luasrc/view/https_dns_proxy/js.htm | 60 ++++++++++++++++++++++ .../view/https_dns_proxy/status-textarea.htm | 13 +++++ .../luasrc/view/https_dns_proxy/status.htm | 10 ++++ 5 files changed, 148 insertions(+) create mode 100644 applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/buttons.htm create mode 100644 applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/css.htm create mode 100644 applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/js.htm create mode 100644 applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/status-textarea.htm create mode 100644 applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/status.htm (limited to 'applications/luci-app-https_dns_proxy/luasrc/view') diff --git a/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/buttons.htm b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/buttons.htm new file mode 100644 index 0000000000..84c5f608d2 --- /dev/null +++ b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/buttons.htm @@ -0,0 +1,56 @@ +<%# + Copyright 2019 Stan Grishin +-%> + +<%- + local packageName = "https_dns_proxy" + local enabledFlag = luci.sys.init.enabled(packageName) + local ubusStatus = luci.util.ubus("service", "list", { name = packageName }) + + if not ubusStatus or not ubusStatus[packageName] then + tmpfsStatusCode = 0 + else + tmpfsStatusCode = 1 + end + + if tmpfsStatusCode == 0 then + btn_start_style = "cbi-button cbi-button-apply important" + btn_action_style = "cbi-button cbi-button-apply important" + btn_stop_style = "cbi-button cbi-button-reset -disabled" + else + btn_start_style = "cbi-button cbi-button-apply -disabled" + btn_action_style = "cbi-button cbi-button-apply important" + btn_stop_style = "cbi-button cbi-button-reset important" + end + if not enabledFlag then + btn_start_style = "cbi-button cbi-button-apply -disabled" + btn_action_style = "cbi-button cbi-button-apply -disabled" + btn_enable_style = "cbi-button cbi-button-apply important" + btn_disable_style = "cbi-button cbi-button-reset -disabled" + else + btn_enable_style = "cbi-button cbi-button-apply -disabled" + btn_disable_style = "cbi-button cbi-button-reset important" + end +-%> + +<%+https_dns_proxy/css%> +<%+https_dns_proxy/js%> + +
+
+ + + + + + +   +   +   +   + + + + +
+
diff --git a/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/css.htm b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/css.htm new file mode 100644 index 0000000000..6fb3d51d3b --- /dev/null +++ b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/css.htm @@ -0,0 +1,9 @@ + diff --git a/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/js.htm b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/js.htm new file mode 100644 index 0000000000..3b0daaa19a --- /dev/null +++ b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/js.htm @@ -0,0 +1,60 @@ + + diff --git a/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/status-textarea.htm b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/status-textarea.htm new file mode 100644 index 0000000000..3840cd19d4 --- /dev/null +++ b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/status-textarea.htm @@ -0,0 +1,13 @@ +<%# +Copyright 2017-2019 Stan Grishin (stangri@melmac.net) +This is free software, licensed under the Apache License, Version 2.0 +-%> + +<%+cbi/valueheader%> + + + +<%+cbi/valuefooter%> diff --git a/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/status.htm b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/status.htm new file mode 100644 index 0000000000..c453428405 --- /dev/null +++ b/applications/luci-app-https_dns_proxy/luasrc/view/https_dns_proxy/status.htm @@ -0,0 +1,10 @@ +<%# +Copyright 2017-2018 Dirk Brenken (dev@brenken.org) +This is free software, licensed under the Apache License, Version 2.0 +-%> + +<%+cbi/valueheader%> + + + +<%+cbi/valuefooter%> -- cgit v1.2.3