summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-02-04 16:20:21 -0600
committerChris Buechler <cmb@pfsense.org>2016-02-04 16:20:21 -0600
commitaeb87745b68663dc97a3ed48aa951ef4075f7042 (patch)
treecdf8ae043fbb9ea5fb21422fa202bbfbd09bad3f /src
parent361cf6749e1306272920a8815f659de85b7deef1 (diff)
downloadpfsense-aeb87745b68663dc97a3ed48aa951ef4075f7042.zip
pfsense-aeb87745b68663dc97a3ed48aa951ef4075f7042.tar.gz
Return blank rather than 0ms/0% for unmonitored gateways latency and loss. Show on dashboard widget when a gateway is unmonitored. Ticket #2226
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/gwlb.inc4
-rw-r--r--src/usr/local/www/widgets/widgets/gateways.widget.php6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc
index b568b6f..86dcf1f 100644
--- a/src/etc/inc/gwlb.inc
+++ b/src/etc/inc/gwlb.inc
@@ -475,8 +475,8 @@ function return_gateways_status($byname = false) {
$status[$target]['monitorip'] = $tgtip;
$status[$target]['srcip'] = $srcip;
$status[$target]['name'] = $gwitem['name'];
- $status[$target]['delay'] = "0.0ms";
- $status[$target]['loss'] = "0.0%";
+ $status[$target]['delay'] = "";
+ $status[$target]['loss'] = "";
$status[$target]['status'] = "none";
}
}
diff --git a/src/usr/local/www/widgets/widgets/gateways.widget.php b/src/usr/local/www/widgets/widgets/gateways.widget.php
index ccb47ea..d23e194 100644
--- a/src/usr/local/www/widgets/widgets/gateways.widget.php
+++ b/src/usr/local/www/widgets/widgets/gateways.widget.php
@@ -244,7 +244,11 @@ function compose_table_body_contents() {
$online = gettext("Latency");
$bgcolor = "warning"; // khaki
} elseif ($gateways_status[$gname]['status'] == "none") {
- $online = gettext("Online");
+ if ($gateways_status[$gname]['monitorip'] == "none") {
+ $online = gettext("Online <br/>(unmonitored)");
+ } else {
+ $online = gettext("Online");
+ }
$bgcolor = "success"; // lightgreen
} elseif ($gateways_status[$gname]['status'] == "") {
$online = gettext("Pending");
OpenPOWER on IntegriCloud