mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add IPv6 check and fixes
This commit is contained in:
parent
602aa8a127
commit
5e6e31e5c7
5 changed files with 224 additions and 26 deletions
|
@ -22,13 +22,14 @@
|
|||
-- Copyright 2018 Ycarus (Yannick Chabanois) ycarus@zugaina.org
|
||||
--
|
||||
-- Small changes to make this work with OpenMPTCProuter
|
||||
-- New features: DNS detection, IPv6 route received,...
|
||||
-%>
|
||||
<%+header%>
|
||||
<link rel="stylesheet" type="text/css" href="<%=resource%>/openmptcprouter/css/wanstatus.css?v=git-18.120.38690-2678b12"/>
|
||||
<script type="text/javascript" src="<%=resource%>/seedrandom.js?v=git-18.120.38690-2678b12"></script>
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-18.120.38690-2678b12"></script>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
XHR.poll(15, '/cgi-bin/luci/admin/system/openmptcprouter/interfaces_status', null,
|
||||
XHR.poll(20, '/cgi-bin/luci/admin/system/openmptcprouter/interfaces_status', null,
|
||||
function(x, mArray)
|
||||
{
|
||||
var status = document.getElementById('openmptcprouter_status');
|
||||
|
@ -176,6 +177,7 @@
|
|||
var latency = mArray.wans[i].latency;
|
||||
var gateway = mArray.wans[i].gateway;
|
||||
var gw_ping = mArray.wans[i].gw_ping;
|
||||
var ipv6_discover = mArray.wans[i].ipv6_discover;
|
||||
// Generate template
|
||||
if(mArray.openmptcprouter.remote_from_lease == true && mArray.wans.length == 1)
|
||||
{
|
||||
|
@ -188,10 +190,18 @@
|
|||
var title = mArray.wans[i].label + " (" + mArray.wans[i].gateway + ")";
|
||||
//var content = String.format('%s<br />wan address: <strong>%s</strong><br />whois: %s<br />latency: %s ms<br />multipath: %s', stat, wanip, whois, latency, multipath);
|
||||
var content = "";
|
||||
if(ipaddr == '')
|
||||
{
|
||||
statusMessage += 'No IP defined<br />'
|
||||
}
|
||||
if(gw_ping == 'DOWN')
|
||||
{
|
||||
statusMessage += 'Gateway DOWN<br />'
|
||||
}
|
||||
if(ipv6_discover == 'DETECTED')
|
||||
{
|
||||
statusMessage += 'IPv6 route received<br />'
|
||||
}
|
||||
content += String.format('ip address: <strong>%s</strong><br />multipath: %s', ipaddr,multipath);
|
||||
if(mArray.wans[i].qos && mArray.wans[i].download > 0 && mArray.wans[i].upload > 0)
|
||||
{
|
||||
|
@ -302,6 +312,6 @@
|
|||
<h2><%:Network overview%></h2>
|
||||
<fieldset id="interface_field" class="cbi-section">
|
||||
<!-- <legend><%:Network overview%></legen> -->
|
||||
<div id="openmptcprouter_status"></div>
|
||||
<div id="openmptcprouter_status"><img src="<%=resource%>/spinner.gif" /></div>
|
||||
</fieldset>
|
||||
<%+footer%>
|
Loading…
Add table
Add a link
Reference in a new issue