summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-04 12:37:15 +0200
committersmos <seth.mos@dds.nl>2012-06-04 12:37:15 +0200
commit603f19f007149348639c9e09366881ea95b28aa4 (patch)
treef9a21350e36dcaee88d5f52825af401d258ede26 /usr/local
parent4a67fc61ad854691252b5239116a0aec8905991e (diff)
downloadpfsense-603f19f007149348639c9e09366881ea95b28aa4.zip
pfsense-603f19f007149348639c9e09366881ea95b28aa4.tar.gz
Some minor enhancements from renaming the Gathering Data to Pending.
When it doesn't exist in the array it's really unknown. Make that lightblue. show a ~
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/includes/functions.inc.php19
-rwxr-xr-xusr/local/www/status_gateways.php6
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>";
OpenPOWER on IntegriCloud