diff --git a/files/www/cgi-bin/mesh b/files/www/cgi-bin/mesh index fc165f47..39362817 100755 --- a/files/www/cgi-bin/mesh +++ b/files/www/cgi-bin/mesh @@ -102,6 +102,23 @@ system "mkdir -p /tmp/web"; system "touch /tmp/web/automesh" if $parms{auto}; system "rm -f /tmp/web/automesh" if $parms{stop}; +#get location info if available +$lat_lon = "Location Not Available"; +if(-f "/etc/latlon") { + $rcgood=open(FILE, "/etc/latlon"); + if($rcgood) { + while(){ + chomp; + push @lat_lon,$_; + } + } + close(FILE); + $lat_lon = "
Location: $lat_lon[0] $lat_lon[1]
"; +} +$olsrTotal = `/sbin/ip route list table 30 | wc -l`; #num hosts olsr is keeping track of +$olsrNodes = `/sbin/ip route list table 30 | egrep "/" | wc -l`; #num *nodes* on the network (minus other hosts) +$node_desc = `/sbin/uci get system.\@system[0].description`; #pull the node description from uci + # parse the txtinfo output $table = "none"; @@ -298,7 +315,12 @@ print "
\n"; alert_banner(); # page header -print "

$node mesh status


"; +print "

$node mesh status

"; + +print "$lat_lon"; #display lat lon info +print "
$node_desc
"; #display nide description +print "
"; +print "
OLSR EntriesTotal = $olsrTotal
Nodes = $olsrNodes
"; #display OLSR numbers # nav buttons if(-f "/tmp/web/automesh") diff --git a/files/www/cgi-bin/setup b/files/www/cgi-bin/setup index c0fb8c13..57c4a0cf 100755 --- a/files/www/cgi-bin/setup +++ b/files/www/cgi-bin/setup @@ -635,7 +635,7 @@ print " Node Description (optional) -"; +"; push @hidden, ""; print " Verify Password diff --git a/files/www/cgi-bin/status b/files/www/cgi-bin/status index 1de0babc..599a0552 100755 --- a/files/www/cgi-bin/status +++ b/files/www/cgi-bin/status @@ -58,6 +58,21 @@ foreach(@wisections) { $wifi_ssid = $_->{ssid}; } } +#get location info if available +$lat_lon = "Location Not Available"; +if(-f "/etc/latlon") { + $rcgood=open(FILE, "/etc/latlon"); + if($rcgood) { + while(){ + chomp; + push @lat_lon,$_; + } + } + close(FILE); + $lat_lon = "
Location: $lat_lon[0] $lat_lon[1]
"; +} +$olsrTotal = `/sbin/ip route list table 30 | wc -l`; #num hosts olsr is keeping track of +$olsrNodes = `/sbin/ip route list table 30 | egrep "/" | wc -l`; #num *nodes* on the network (minus other hosts) read_postdata(); @@ -78,6 +93,7 @@ alert_banner(); print "

$node"; print " / $tactical" if $tactical; print "

"; +print "
$lat_lon
"; #display location info print "
$node_desc
" if $node_desc; print "
\n"; @@ -238,6 +254,7 @@ $str .= $space < 500 ? "$space KB" : "$space KB"; $str .= "
"; push @col2, $str; +push @col2, "OLSR EntriesTotal = $olsrTotal
Nodes = $olsrNodes"; #display OLSR numbers # now print the tables