1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Fix wizard

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-02-01 16:21:58 +01:00
parent d2aeaf3c2b
commit 9432081ec4
2 changed files with 10 additions and 9 deletions

View file

@ -246,7 +246,7 @@ function wizard_add()
ucic:set("network",intf,"type",typeintf)
end
if vlan ~= "" then
ifname=ifname .. '.' .. vlan
ifname = ifname .. '.' .. vlan
end
if typeintf == "macvlan" and masterintf ~= "" then
ucic:set("network",intf,"type","macvlan")
@ -905,6 +905,9 @@ function settings_add()
-- Enable/disable debug
local debug = luci.http.formvalue("debug") or "0"
ucic:set("openmptcprouter","settings","debug",debug)
ucic:foreach("shadowsocks-libev", "ss_redir", function (section)
ucic:set("shadowsocks-libev",section[".name"],"verbose",debug)
end)
-- Enable/disable vnstat backup
local savevnstat = luci.http.formvalue("savevnstat") or "0"

View file

@ -549,26 +549,24 @@
<%
iffind=0
uciifname=uci:get("network",ifname,"ifname")
ifname=splitstring(uciifname,'.')[1] or ""
realifname=splitstring(uciifname,'.')[1] or ""
vlan=splitstring(uciifname,'.')[2] or ""
for _, ifacea in ipairs(ifaces) do
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then
%>
<option value="<%=ifacea%>"<% if ifname == ifacea then iffind = 1 %> selected="selected"<% end %>><%=ifacea%></option>
<option value="<%=ifacea%>"<% if realifname == ifacea then iffind = 1 %> selected="selected"<% end %>><%=ifacea%></option>
<%
end
end
if iffind == 0 and uci:get("network",ifname,"ifname") ~= nil then
if iffind == 0 and uciifname ~= nil then
%>
<option value="<%=ifname%>" selected="selected"><%=ifname%></option>
<option value="<%=uciifname%>" selected="selected"><%=uciifname%></option>
<%
end
%>
</select>
</div>
<label class="cbi-value-title"><%:VLAN%></label>
<div class="cbi-value-field">
<input type="text" id="cbid.network.<%=ifname%>.vlan" name="cbid.network.<%=ifname%>.vlan" class="cbi-input-text" placeholder="<%:VLAN%>" value="<%=vlan%>" data-type="uinteger" data-optional="false">
<label><%:VLAN%></label>
<input type="text" id="cbid.network.<%=ifname%>.vlan" name="cbid.network.<%=ifname%>.vlan" class="cbi-input-text" placeholder="<%:VLAN%>" value="<%=vlan%>" data-optional="true">
<br />
<div class="cbi-value-description">
<%:Choose physical interface.%>