summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing')
-rw-r--r--applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm20
-rw-r--r--applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm14
-rw-r--r--applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-service.htm10
-rw-r--r--applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm6
4 files changed, 32 insertions, 18 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..8a64698b6c 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
@@ -36,29 +38,29 @@
end
-%>
-<div class="cbi-value"><label class="cbi-value-title">Service Control</label>
+<%+cbi/valueheader%>
<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>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
- <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>
-</div>
+<%+cbi/valuefooter%>
<%-if not btn_start_status then%>
<script type="text/javascript">document.getElementById("btn_start").disabled = true;</script>
diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm
index 710587ad82..377cfeeaac 100644
--- a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm
+++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm
@@ -1,18 +1,18 @@
<%#
-Copyright 2017-2019 Stan Grishin (stangri@melmac.net)
+Copyright 2017-2020 Stan Grishin (stangri@melmac.net)
This is free software, licensed under the Apache License, Version 2.0
-%>
<%+cbi/valueheader%>
-<textarea rows="<%=select(2, self:cfgvalue(section):gsub('\n', '\n'))%>"
- style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:20px;width:50em;padding:none;margin:6px;resize:none;overflow:hidden;"
- disabled="disabled"><%=self:cfgvalue(section):gsub('\n', '\n')%>
-</textarea>
+<div style="font-weight:bold;">
+ <%=self:cfgvalue(section):gsub('\n', '<br />' )%>
+</div>
+<br />
<div>
-<%- local readmeURL = "https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md" -%>
-<%=translatef("Checkmark represents the default gateway. See the %sREADME%s for details.", "<a href=\"" .. readmeURL .. "#a-word-about-default-routing" .. "\" target=\"_blank\">", "</a>")%>
+ <%- local readmeURL = "https://docs.openwrt.melmac.net/vpn-policy-routing/" -%>
+ <%=translatef("The %s indicates default gateway. See the %sREADME%s for details.", "<strong>✓</strong>", "<a href=\"" .. readmeURL .. "#a-word-about-default-routing" .. "\" target=\"_blank\">", "</a>")%>
</div>
<%+cbi/valuefooter%> \ No newline at end of file
diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-service.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-service.htm
new file mode 100644
index 0000000000..c453428405
--- /dev/null
+++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-service.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%>
+
+<input name="status" id="status" type="text" class="cbi-input-text" style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:30px;height:30px;width:50em;" value="<%=self:cfgvalue(section)%>" disabled="disabled" />
+
+<%+cbi/valuefooter%>
diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm
index c453428405..4a93564614 100644
--- a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm
+++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm
@@ -1,10 +1,12 @@
<%#
-Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
+Copyright 2017-2019 Stan Grishin (stangri@melmac.net)
This is free software, licensed under the Apache License, Version 2.0
-%>
<%+cbi/valueheader%>
-<input name="status" id="status" type="text" class="cbi-input-text" style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:30px;height:30px;width:50em;" value="<%=self:cfgvalue(section)%>" disabled="disabled" />
+<div style="font-weight:bold;">
+ <%=self:cfgvalue(section):gsub('\n', '<br />' )%>
+</div>
<%+cbi/valuefooter%>