bugfix: mesh stat: previous neig remove mid notation, show double same neigh {rf,dtd}

This commit is contained in:
AE6XE 2015-05-25 10:46:15 -07:00
parent 2e5c239ed5
commit f1df364997
1 changed files with 7 additions and 2 deletions

View File

@ -281,7 +281,8 @@ if(keys %localhosts)
$tactical = $localhosts{$ip}{tactical} ? " / " . $localhosts{$ip}{tactical} : "";
$rows{$host} = sprintf "<tr><td valign=top><nobr>%s</nobr>", $host . $tactical;
if ( $wangateway{$ip} ) { $rows{$host} .= " &nbsp; <small>(wan)</small>"; }
if ( $wangateway{$ip} ) { $nodeiface = "wan" ; }
if ( $nodeiface ) { $rows{$host} .= " &nbsp; <small>($nodeiface)</small>"; }
$rows{$host} .= "</td><td colspan=3>&nbsp;</td><td>\n" ;
@ -397,6 +398,7 @@ if(keys %links)
$ipmain = exists $ipalias{$ip} ? $ipalias{$ip} : $ip ;
$host = $hosts{$ipmain}{name} ? $hosts{$ipmain}{name} : $ipmain;
$tactical = $hosts{$ipmain}{tactical} ? " / " . $hosts{$ipmain}{tactical} : "";
if ( $rows{$host} ) { $host .= " " ; } # avoid collision 2 links to same host {rf, dtd}
$rows{$host} = sprintf "<tr><td valign=top><nobr><a href='http://%s:8080/'>%s</a>", $host, $host . $tactical;
@ -408,7 +410,7 @@ if(keys %links)
else { $nodeiface="?" ; }
}
if ( $wangateway{$ip} or $wangateway{$ipalias{$ip}} ) { $nodeiface = $nodeiface ? $nodeiface . ",wan" : "wan" ; }
if ( $wangateway{$ip} or $wangateway{$ipmain} ) { $nodeiface = $nodeiface ? $nodeiface . ",wan" : "wan" ; }
if ( $nodeiface ) { $rows{$host} .= " &nbsp; <small>($nodeiface)</small>"; }
$rows{$host} .= sprintf ("</nobr></td><td></td><td align=right valign=top>%.0f%%</td><td align=right valign=top>%.0f%%</td><td></td><td>\n", 100*$links{$ip}{lq}, 100*$links{$ip}{nlq});
@ -449,8 +451,11 @@ print "<tr><td colspan=6><hr></td></tr>\n";
foreach $ip (keys %history)
{
next if $links{$ip};
next if $links{$ipalias{$ip}};
$age = sprintf "%010d", $uptime - $history{$ip}{age};
$host = $history{$ip}{host} ? $history{$ip}{host} : $ip;
$host =~ s/^mid\d+\.// ;
$host =~ s/^dtdlink\.// ;
$rows{$age} .= sprintf "<tr><td colspan=4><nobr>%s</nobr>", $host;
foreach(@{$hosts{$ip}{hosts}}) { $rows{$age} .= "<br><nobr><img src='/dot.png'>$_</nobr>" }
$rows{$age} .= "</td><td valign=top><nobr>";