mirror of https://github.com/aredn/aredn.git
resized distance field, changed is_online technique
This commit is contained in:
parent
c9b2670d99
commit
cb1bd15823
|
@ -1450,11 +1450,12 @@ sub css_options
|
|||
|
||||
sub is_online()
|
||||
{
|
||||
# test for web connectivity
|
||||
my $pingOk=0;
|
||||
my $rc=system("ping -c2 -W1 8.8.8.8 > /dev/null 2>&1");
|
||||
$pingOk=1 if($rc==0);
|
||||
return $pingOk;
|
||||
my $online=0;
|
||||
if(get_default_gw() ne "none")
|
||||
{
|
||||
$online=1;
|
||||
}
|
||||
return $online;
|
||||
}
|
||||
|
||||
#weird uhttpd/busybox error requires a 1 at the end of this file
|
||||
|
|
|
@ -746,8 +746,6 @@ if($wifi_proto ne "disabled")
|
|||
|
||||
print "<tr><td colspan=2 align=center><hr><small>Active Settings</small></td></tr>\n";
|
||||
|
||||
print "<tr><td colspan=2><br>Antenna selection is now automatic<br><br></td></tr>";
|
||||
|
||||
print "<tr><td><nobr>Tx Power</nobr></td>\n";
|
||||
print "<td><select name=wifi_txpower>\n";
|
||||
my $txpoweroffset = wifi_txpoweroffset();
|
||||
|
@ -757,7 +755,7 @@ if($wifi_proto ne "disabled")
|
|||
print "<tr id='dist' class='dist-norm'><td>Distance to<br />FARTHEST Neighbor</td>\n";
|
||||
$wifi_distance_disp=int($wifi_distance/1000);
|
||||
|
||||
print "<td><input readonly type=text size=8 name='wifi_distance_disp' value='$wifi_distance_disp' title='Distance to the farthest neighbor'> <span id='distance_unit_text'>kilometers</span><br />";
|
||||
print "<td><input readonly type=text size=4 name='wifi_distance_disp' value='$wifi_distance_disp' title='Distance to the farthest neighbor'> <span id='distance_unit_text'>kilometers</span><br />";
|
||||
|
||||
print "<input id='distance_slider' type='range' min='0' max='150' step='1' value='$wifi_distance_disp' oninput='updDist(this.value)' onchange='updDist(this.value)' /><br />";
|
||||
print "<input type='radio' name='distance_unit' value='miles' onchange='updDistUnit(this.value)'>Miles ";
|
||||
|
|
Loading…
Reference in New Issue