summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/status_gateways.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-01-05 13:42:22 +0545
committerRenato Botelho <renato@netgate.com>2017-01-05 10:47:21 -0200
commite551eed05f71c46c3601790ddb6f2d6d15f8bd52 (patch)
treebbb49c970f6b3eadb632705d21f011e8a47d6b2d /src/usr/local/www/status_gateways.php
parent46237e23f35db70a917939609061dce7b7f955f9 (diff)
downloadpfsense-e551eed05f71c46c3601790ddb6f2d6d15f8bd52.zip
pfsense-e551eed05f71c46c3601790ddb6f2d6d15f8bd52.tar.gz
Correctly report unmonitored gateway status
If an alternate monitor IP has been entered and saved, then the user checks "Disable Gateway Monitoring" and saves, the alternate monitor IP is retained in the config - that is handy for when unchecking "Disable Gateway Monitoring" later on. But the Gateways widget and Status Gateways do not correctly understand this combination. The gateway status shows as "Online" when it is intended to show "Online (unmonitored)". This PR corrects this. (cherry picked from commit 0c5d4e8d3e4dc81a9c7eb883a40296493e9faa2b)
Diffstat (limited to 'src/usr/local/www/status_gateways.php')
-rw-r--r--src/usr/local/www/status_gateways.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/local/www/status_gateways.php b/src/usr/local/www/status_gateways.php
index f4f3680..6233636 100644
--- a/src/usr/local/www/status_gateways.php
+++ b/src/usr/local/www/status_gateways.php
@@ -172,11 +172,17 @@ display_top_tabs($tab_array);
$online = gettext("Warning, Latency") . ': ' . $status['delay'];
$bgcolor = "bg-warning";
} elseif ($status['status'] == "none") {
- $online = gettext("Online");
+ if ($status['monitor_disable'] || ($status['monitorip'] == "none")) {
+ $online = gettext("Online (unmonitored)");
+ } else {
+ $online = gettext("Online");
+ }
$bgcolor = "bg-success";
}
} else if (isset($gateway['monitor_disable'])) {
- $online = gettext("Online");
+ // Note: return_gateways_status() always returns an array entry for all gateways,
+ // so this "else if" never happens.
+ $online = gettext("Online (unmonitored)");
$bgcolor = "bg-success";
} else {
$online = gettext("Pending");
OpenPOWER on IntegriCloud