mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add option to disable gateway and server ping check for status page
This commit is contained in:
parent
c9327c9214
commit
5a644babf8
3 changed files with 32 additions and 5 deletions
|
@ -597,12 +597,19 @@ function settings_add()
|
|||
-- Enable/disable external check
|
||||
local externalcheck = luci.http.formvalue("externalcheck") or "1"
|
||||
ucic:set("openmptcprouter","settings","external_check",externalcheck)
|
||||
ucic:commit("openmptcprouter")
|
||||
|
||||
-- Enable/disable external check
|
||||
local savevnstat = luci.http.formvalue("savevnstat") or "0"
|
||||
luci.sys.exec("uci -q set vnstat.@vnstat[0].backup=%s" % savevnstat)
|
||||
ucic:commit("openmptcprouter")
|
||||
ucic:commit("vnstat")
|
||||
|
||||
-- Enable/disable gateway ping
|
||||
local disablegwping = luci.http.formvalue("disablegwping") or "0"
|
||||
ucic:set("openmtpcprouter","settings","disablegwping",disablegwping)
|
||||
|
||||
-- Enable/disable server ping
|
||||
local disableserverping = luci.http.formvalue("disableserverping") or "0"
|
||||
ucic:set("openmtpcprouter","settings","disableserverping",disableserverping)
|
||||
|
||||
-- Enable/disable fast open
|
||||
local disablefastopen = luci.http.formvalue("disablefastopen") or "0"
|
||||
|
|
|
@ -167,6 +167,26 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable gateway ping%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="disablegwping" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disablegwping") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Disable gateway ping status check%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable server ping%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="disableserverping" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disableserverping") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Disable server ping status check%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Master interface selection%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue