mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
Various fix
This commit is contained in:
parent
163ab6a022
commit
b6c11bc989
3 changed files with 9 additions and 4 deletions
|
@ -645,11 +645,11 @@ function settings_add()
|
||||||
|
|
||||||
-- Enable/disable gateway ping
|
-- Enable/disable gateway ping
|
||||||
local disablegwping = luci.http.formvalue("disablegwping") or "0"
|
local disablegwping = luci.http.formvalue("disablegwping") or "0"
|
||||||
ucic:set("openmtpcprouter","settings","disablegwping",disablegwping)
|
ucic:set("openmptcprouter","settings","disablegwping",disablegwping)
|
||||||
|
|
||||||
-- Enable/disable server ping
|
-- Enable/disable server ping
|
||||||
local disableserverping = luci.http.formvalue("disableserverping") or "0"
|
local disableserverping = luci.http.formvalue("disableserverping") or "0"
|
||||||
ucic:set("openmtpcprouter","settings","disableserverping",disableserverping)
|
ucic:set("openmptcprouter","settings","disableserverping",disableserverping)
|
||||||
|
|
||||||
-- Enable/disable fast open
|
-- Enable/disable fast open
|
||||||
local disablefastopen = luci.http.formvalue("disablefastopen") or "0"
|
local disablefastopen = luci.http.formvalue("disablefastopen") or "0"
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Save vnstats stats%></label>
|
<label class="cbi-value-title"><%:Save vnstats stats%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="checkbox" name="savevnstat" class="cbi-input-checkbox" value="1" <% if luci.sys.exec("uci -q get vnstat.@vnstat[0].backup") == "1" then %>checked<% end %>>
|
<input type="checkbox" name="savevnstat" class="cbi-input-checkbox" value="1" <% if tonumber(luci.sys.exec("uci -q get vnstat.@vnstat[0].backup")) == "1" then %>checked<% end %>>
|
||||||
<br />
|
<br />
|
||||||
<div class="cbi-value-description">
|
<div class="cbi-value-description">
|
||||||
<%:Save vnstats statistics on disk%>
|
<%:Save vnstats statistics on disk%>
|
||||||
|
|
|
@ -733,9 +733,14 @@ function interfaces_status()
|
||||||
if status and vpsinfo.vps ~= nil then
|
if status and vpsinfo.vps ~= nil then
|
||||||
mArray.openmptcprouter["vps_loadavg"] = vpsinfo.vps.loadavg or ""
|
mArray.openmptcprouter["vps_loadavg"] = vpsinfo.vps.loadavg or ""
|
||||||
mArray.openmptcprouter["vps_uptime"] = vpsinfo.vps.uptime or ""
|
mArray.openmptcprouter["vps_uptime"] = vpsinfo.vps.uptime or ""
|
||||||
mArray.openmptcprouter["vps_mptcp"] = vpsinfo.vps.mptcp or ""
|
mArray.openmptcprouter["vps_mptcp"] = vpsinfo.vps.mptcp.enabled or ""
|
||||||
mArray.openmptcprouter["vps_hostname"] = vpsinfo.vps.hostname or ""
|
mArray.openmptcprouter["vps_hostname"] = vpsinfo.vps.hostname or ""
|
||||||
mArray.openmptcprouter["vps_time"] = vpsinfo.vps.time or ""
|
mArray.openmptcprouter["vps_time"] = vpsinfo.vps.time or ""
|
||||||
|
if vpsinfo.vps.kernel ~= nil then
|
||||||
|
mArray.openmptcprouter["vps_kernel"] = vpsinfo.vps.kernel or ""
|
||||||
|
mArray.openmptcprouter["vps_omr_version"] = vpsinfo.vps.omr_version or ""
|
||||||
|
mArray.openmptcprouter["ss_traffic"] = vpsinfo.shadowsocks.traffic or ""
|
||||||
|
end
|
||||||
if vpsinfo.vps.time ~= "" then
|
if vpsinfo.vps.time ~= "" then
|
||||||
if os.time() - vpsinfo.vps.time > 10 then
|
if os.time() - vpsinfo.vps.time > 10 then
|
||||||
mArray.openmptcprouter["vps_time_accurate"] = false
|
mArray.openmptcprouter["vps_time_accurate"] = false
|
||||||
|
|
Loading…
Reference in a new issue