luci-app-vpnbypass: use VPN node by default
Signed-off-by: Stan Grishin <stangri@melmac.net>
This commit is contained in:
parent
b1cb0d6d59
commit
5a73011585
6 changed files with 29 additions and 33 deletions
|
@ -10,7 +10,7 @@ LUCI_TITLE:=VPN Bypass Web UI
|
|||
LUCI_DESCRIPTION:=Provides Web UI for VPNBypass service.
|
||||
LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full +vpnbypass
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_RELEASE:=13
|
||||
PKG_RELEASE:=14
|
||||
|
||||
include ../../luci.mk
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
module("luci.controller.vpnbypass", package.seeall)
|
||||
function index()
|
||||
if nixio.fs.access("/etc/config/vpnbypass") then
|
||||
local node = "services"
|
||||
if luci.dispatcher.lookup("admin/vpn") then node = "vpn" end
|
||||
entry({"admin", node, "vpnbypass"}, cbi("vpnbypass"), _("VPN Bypass"))
|
||||
entry({"admin", node, "vpnbypass", "action"}, call("vpnbypass_action"), nil).leaf = true
|
||||
entry({"admin", "vpn", "vpnbypass"}, cbi("vpnbypass"), _("VPN Bypass"))
|
||||
entry({"admin", "vpn", "vpnbypass", "action"}, call("vpnbypass_action"), nil).leaf = true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<%- if luci.dispatcher.lookup("admin/vpn") then node = "vpn" else node = "services" end -%>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function button_action(action) {
|
||||
|
@ -33,7 +31,7 @@
|
|||
btn_enable.disabled = true;
|
||||
btn_disable.disabled = true;
|
||||
spinner(btn_spinner, 1);
|
||||
xhr.get('<%=luci.dispatcher.build_url("admin", node, "vpnbypass", "action")%>/' + action.name, null,
|
||||
xhr.get('<%=luci.dispatcher.build_url("admin", "vpn", "vpnbypass", "action")%>/' + action.name, null,
|
||||
function (x) {
|
||||
if (!x) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue