diff options
Diffstat (limited to 'applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm')
-rw-r--r-- | applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm index 37a0b9a414..b1ec6fbf97 100644 --- a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm +++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm @@ -5,11 +5,13 @@ <%- local packageName = "vpn-policy-routing" + local uci = require "luci.model.uci".cursor() + local sys = require "luci.sys" local serviceRunning, serviceEnabled = false, false; - if luci.sys.call("iptables -t mangle -L | grep -q VPR_PREROUTING") == 0 then + if sys.call("iptables -t mangle -L | grep -q VPR_PREROUTING") == 0 then serviceRunning = true end - if luci.model.uci.cursor():get(packageName, "config", "enabled") == "1" then + if uci:get(packageName, "config", "enabled") == "1" then serviceEnabled = true end @@ -38,23 +40,23 @@ <div class="cbi-value"><label class="cbi-value-title">Service Control</label> <div class="cbi-value-field"> - <input type="button" class="cbi-button cbi-button-apply" id="btn_start" name="start" value="<%:Start%>" + <input type="button" class="btn cbi-button cbi-button-apply" id="btn_start" name="start" value="<%:Start%>" onclick="button_action(this)" /> <span id="btn_start_spinner" class="btn_spinner"></span> - <input type="button" class="cbi-button cbi-button-apply" id="btn_action" name="action" value="<%:Restart%>" + <input type="button" class="btn cbi-button cbi-button-apply" id="btn_action" name="action" value="<%:Restart%>" onclick="button_action(this)" /> <span id="btn_action_spinner" class="btn_spinner"></span> - <input type="button" class="cbi-button cbi-button-reset" id="btn_stop" name="stop" value="<%:Stop%>" + <input type="button" class="btn cbi-button cbi-button-reset" id="btn_stop" name="stop" value="<%:Stop%>" onclick="button_action(this)" /> <span id="btn_stop_spinner" class="btn_spinner"></span> - <input type="button" class="cbi-button cbi-button-apply" id="btn_enable" name="enable" value="<%:Enable%>" + <input type="button" class="btn cbi-button cbi-button-apply" id="btn_enable" name="enable" value="<%:Enable%>" onclick="button_action(this)" /> <span id="btn_enable_spinner" class="btn_spinner"></span> - <input type="button" class="cbi-button cbi-button-reset" id="btn_disable" name="disable" value="<%:Disable%>" + <input type="button" class="btn cbi-button cbi-button-reset" id="btn_disable" name="disable" value="<%:Disable%>" onclick="button_action(this)" /> <span id="btn_disable_spinner" class="btn_spinner"></span> </div> |