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

Display ifname if not same as label

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-02-04 14:43:22 +01:00
parent 4be6009680
commit b4013edd0c
2 changed files with 289 additions and 219 deletions

View file

@ -404,17 +404,26 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
}
// Populate info
var wanip = mArray.wans[i].wanip;
var wanip6 = mArray.wans[i].wanip6;
if (anonymize == "true" && testPrivateIP(wanip) == false)
{
wanip=replaceLastNChars(wanip,"x",6);
}
var wanip6 = mArray.wans[i].wanip6;
if (anonymize == "true")
{
wanip6=replaceLastNChars(wanip6,"x",6);
}
var ipaddr = mArray.wans[i].ipaddr;
var ip6addr = mArray.wans[i].ip6addr;
if (anonymize == "true" && testPrivateIP(ipaddr) == false)
{
ipaddr=replaceLastNChars(ipaddr,"x",6);
}
var ip6addr = mArray.wans[i].ip6addr;
if (anonymize == "true")
{
ip6addr=replaceLastNChars(ip6addr,"x",6);
}
var ifname = mArray.wans[i].ifname;
var whois = mArray.wans[i].whois;
var whois6 = mArray.wans[i].whois6;
var signal = mArray.wans[i].signal;
@ -469,7 +478,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
{
content += String.format('%s <strong>%s</strong><br />','<%:ip address:%>', ipaddr);
}
if(ip6addr !== '' && gateway6 != '')
if(ip6addr !== '' && gateway6 !== '')
{
content += String.format('%s <strong>%s</strong><br />','<%:ipv6 address:%>', ip6addr);
}
@ -481,6 +490,10 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
{
content += String.format('%s <strong>%s</strong><br />','<%:wan ipv6 address:%>', wanip6);
}
if(ifname !== '' && ifname !== mArray.wans[i].label)
{
content += String.format('%s %s<br />','<%:interface:%>', ifname);
}
if(whois !== '')
{
content += String.format('%s %s<br />','<%:whois:%>', whois);

File diff suppressed because it is too large Load diff