diff options
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/includes/functions.inc.php | 19 | ||||
-rwxr-xr-x | usr/local/www/status_gateways.php | 6 |
2 files changed, 14 insertions, 11 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 3ad1c5a..b6afbff 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -36,8 +36,8 @@ function get_gatewaystats() { $data .= ","; $isfirst = false; $data .= $gw['name'] . ","; - $data .= lookup_gateway_ip_by_name($gname) . ","; if ($gateways_status[$gname]) { + $data .= lookup_gateway_ip_by_name($gname) . ","; $gws = $gateways_status[$gname]; switch(strtolower($gws['status'])) { case "none": @@ -49,22 +49,25 @@ function get_gatewaystats() { $bgcolor = "lightcoral"; break; case "delay": - $online = "Warning: Latency"; + $online = "Latency"; $bgcolor = "khaki"; break; case "loss": - $online = "Warning: Packetloss"; + $online = "Packetloss"; $bgcolor = "khaki"; break; default: - $online = "Gathering data"; + $online = "Pending"; break; } } else { - $online = "Gathering data"; - $bgcolor = "lightgray"; + $data .= "~,"; + $gws['delay'] = "~"; + $gws['loss'] = "~"; + $online = "Unknown"; + $bgcolor = "lightblue"; } - $data .= ($online == "Gathering data") ? "{$online},{$online}," : "{$gws['delay']},{$gws['loss']},"; + $data .= ($online == "Pending") ? "{$online},{$online}," : "{$gws['delay']},{$gws['loss']},"; $data .= "<table><tr><td bgcolor=\"$bgcolor\" > $online </td></td></tr></table>"; } return $data; @@ -309,4 +312,4 @@ function get_interfacestatus() { return $data; } -?>
\ No newline at end of file +?> diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php index 0feba2a..7d7ebbc 100755 --- a/usr/local/www/status_gateways.php +++ b/usr/local/www/status_gateways.php @@ -97,7 +97,7 @@ include("head.inc"); <?php if ($gateways_status[$gname]) echo $gateways_status[$gname]['delay']; else - echo gettext("Gathering data"); + echo gettext("Pending"); ?> <?php $counter++; ?> </td> @@ -105,7 +105,7 @@ include("head.inc"); <?php if ($gateways_status[$gname]) echo $gateways_status[$gname]['loss']; else - echo gettext("Gathering data"); + echo gettext("Pending"); ?> <?php $counter++; ?> </td> @@ -131,7 +131,7 @@ include("head.inc"); $online = gettext("Online"); $bgcolor = "lightgreen"; } else { - $online = gettext("Gathering data"); + $online = gettext("Pending"); $bgcolor = "lightgray"; } echo "<tr><td><table width='100%'><tr><td bgcolor=\"$bgcolor\" > $online </td></tr><tr><td>"; |