mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
Fix typo and QoS speed limit set like sqm speed limit in wizard
This commit is contained in:
parent
bad27cdf58
commit
89bd189478
2 changed files with 21 additions and 10 deletions
|
@ -84,12 +84,18 @@ function wizard_add()
|
||||||
ucic:set("sqm",intf,"download",downloadspeed)
|
ucic:set("sqm",intf,"download",downloadspeed)
|
||||||
ucic:set("sqm",intf,"upload",uploadspeed)
|
ucic:set("sqm",intf,"upload",uploadspeed)
|
||||||
ucic:set("sqm",intf,"enabled","1")
|
ucic:set("sqm",intf,"enabled","1")
|
||||||
|
ucic:set("qos",intf,"download",downloadspeed)
|
||||||
|
ucic:set("qos",intf,"upload",uploadspeed)
|
||||||
|
ucic:set("qos",intf,"enabled","1")
|
||||||
else
|
else
|
||||||
ucic:set("sqm",intf,"enabled","0")
|
ucic:set("sqm",intf,"enabled","0")
|
||||||
|
ucic:set("qos",intf,"enabled","0")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ucic:save("sqm")
|
ucic:save("sqm")
|
||||||
ucic:commit("sqm")
|
ucic:commit("sqm")
|
||||||
|
ucic:save("qos")
|
||||||
|
ucic:commit("qos")
|
||||||
ucic:save("network")
|
ucic:save("network")
|
||||||
ucic:commit("network")
|
ucic:commit("network")
|
||||||
|
|
||||||
|
@ -97,7 +103,7 @@ function wizard_add()
|
||||||
local disable_ipv6 = "0"
|
local disable_ipv6 = "0"
|
||||||
local enable_ipv6 = luci.http.formvalue("enableipv6") or "1"
|
local enable_ipv6 = luci.http.formvalue("enableipv6") or "1"
|
||||||
if enable_ipv6 == "0" then
|
if enable_ipv6 == "0" then
|
||||||
disable_pv6 = "1"
|
disable_ipv6 = "1"
|
||||||
end
|
end
|
||||||
set_ipv6_state(disable_ipv6)
|
set_ipv6_state(disable_ipv6)
|
||||||
|
|
||||||
|
@ -576,7 +582,7 @@ function interfaces_status()
|
||||||
uci:foreach("network", "interface", function (section)
|
uci:foreach("network", "interface", function (section)
|
||||||
local interface = section[".name"]
|
local interface = section[".name"]
|
||||||
local net = ntm:get_network(interface)
|
local net = ntm:get_network(interface)
|
||||||
local ipaddr = net:ipaddr()
|
local ipaddr = net:ipaddr() or ""
|
||||||
local gateway = section["gateway"] or ""
|
local gateway = section["gateway"] or ""
|
||||||
local multipath = section["multipath"]
|
local multipath = section["multipath"]
|
||||||
local enabled = section["auto"]
|
local enabled = section["auto"]
|
||||||
|
|
|
@ -167,31 +167,36 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%
|
<%
|
||||||
if nixio.fs.access("/etc/init.d/sqm") then
|
local download = ""
|
||||||
|
local upload = ""
|
||||||
|
if nixio.fs.access("/etc/init.d/sqm") then
|
||||||
|
download = uci:get("sqm",ifname,"download")
|
||||||
|
upload = uci:get("sqm",ifname,"upload")
|
||||||
|
else
|
||||||
|
download = uci:get("qos",ifname,"download")
|
||||||
|
upload = uci:get("qos",ifname,"upload")
|
||||||
|
end
|
||||||
%>
|
%>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Download speed (Kb/s)%></label>
|
<label class="cbi-value-title"><%:Download speed (Kb/s)%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="text" name="cbid.sqm.<%=ifname%>.download" class="cbi-input-text" value="<%=uci:get("sqm",ifname,"download")%>" data-type="uinteger">
|
<input type="text" name="cbid.sqm.<%=ifname%>.download" class="cbi-input-text" value="<%=download%>" data-type="uinteger">
|
||||||
<br />
|
<br />
|
||||||
<div class="cbi-value-description">
|
<div class="cbi-value-description">
|
||||||
<%:Set value between 80-95% of max download speed link. Used for SQM. Empty to disable.%>
|
<%:Set value between 80-95% of max download speed link. Empty to disable.%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Upload speed (Kb/s)%></label>
|
<label class="cbi-value-title"><%:Upload speed (Kb/s)%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="text" name="cbid.sqm.<%=ifname%>.upload" class="cbi-input-text" value="<%=uci:get("sqm",ifname,"upload")%>" data-type="uinteger">
|
<input type="text" name="cbid.sqm.<%=ifname%>.upload" class="cbi-input-text" value="<%=upload%>" data-type="uinteger">
|
||||||
<br />
|
<br />
|
||||||
<div class="cbi-value-description">
|
<div class="cbi-value-description">
|
||||||
<%:Set value between 80-95% of max upload speed link. Used for SQM. Empty to disable.%>
|
<%:Set value between 80-95% of max upload speed link. Empty to disable.%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%
|
|
||||||
end
|
|
||||||
%>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<%
|
<%
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue