1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge pull request #78 from Ysurac/develop

sync
This commit is contained in:
suyuan 2021-02-26 21:26:22 +08:00 committed by GitHub
commit 4ac8c7539b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 3206 additions and 1953 deletions

View file

@ -455,6 +455,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
var multipath_available = mArray.wans[i].multipath_available;
var multipath_state = mArray.wans[i].multipath_state;
var duplicateif = mArray.wans[i].duplicateif;
var duplicatemac = mArray.wans[i].duplicatemac;
// Generate template
if(mArray.openmptcprouter.remote_from_lease == true && mArray.wans.length == 1)
{
@ -547,12 +548,12 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
if(gateway == '' && gateway6 == '')
{
statusMessage += '<%:No gateway defined%>' + '<br />';
} else if(gw_ping == 'DOWN')
} else if(gateway != '' && gw_ping == 'DOWN')
{
statusMessage += '<%:Gateway DOWN%>' + '<br />';
} else if(gw_ping6 == 'DOWN')
} else if(gateway6 != '' && gw_ping6 == 'DOWN')
{
statusMessage += '<%:Gateway DOWN%>' + '<br />';
statusMessage += '<%:Gateway IPv6 DOWN%>' + '<br />';
} else if(multipath_available == 'ERROR')
{
statusMessage += '<%:Multipath seems to be blocked on the connection%>' + '<br />';
@ -566,7 +567,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
statusMessage += '<%:Wan IP and gateway are identical%>' + '<br />';
statusMessageClass = "error";
}
if (stat == 'Offline' && ip6addr != '' && ipaddr == mArray.wans[i].gateway6)
if (stat == 'Offline' && ip6addr != '' && ip6addr == mArray.wans[i].gateway6)
{
statusMessage += '<%:Wan IP and gateway are identical%>' + '<br />';
statusMessageClass = "error";
@ -595,6 +596,11 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
statusMessage += '<%:Network interface duplicated%>' + '<br />';
statusMessageClass = "error";
}
if(duplicatemac)
{
statusMessage += '<%:Network interface MAC address duplicated%>' + '<br />';
statusMessageClass = "error";
}
if(ipv6_discover == 'DETECTED')
{
statusMessage += '<%:IPv6 route received%>' + '<br />'

View file

@ -372,7 +372,7 @@
<%
for _, iface in ipairs(net:get_networks()) do
local ifname = iface:name()
local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.@zone[0].network | grep " .. ifname))
local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_lan.network | grep " .. ifname))
if firewall_lan ~= "" then
%>
<h3><%=ifname%></h3>
@ -475,7 +475,7 @@
<%
for _, iface in ipairs(net:get_networks()) do
local ifname = iface:name()
local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.@zone[1].network | grep " .. ifname))
local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_wan.network | grep " .. ifname))
if firewall_wan ~= "" then
-- local multipath = uci:get("network",ifname,"multipath")
@ -943,9 +943,10 @@
</div>
</fieldset>
</div>
<div class="cbi-page-actions">
<div class="cbi-page-actions control-group">
<input type="hidden" name="token" value="<%=token%>" />
<input class="cbi-button cbi-button-apply" type="submit" value="<%:Save & Apply%>" /> <input class="cbi-button cbi-button-reset" type="button" value="Reset" onclick="location.href='<%=url('admin/system/openmptcprouter/wizard')%>'" />
<button class="cbi-button cbi-button-apply"><%:Save & Apply%></button>
<button class="cbi-button cbi-button-reset"><%:Reset%></button>
</div>
</form>
<script type="text/javascript">cbi_init();</script>