From 76db94c28d3cabe38f0b0921c21f80dfddcf93fc Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 8 May 2012 11:37:10 -0400 Subject: Add last check timestamp to gateway status (actually just fix it, since the code was there, but not functional) Fixes #1155 --- usr/local/www/status_gateways.php | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'usr/local/www/status_gateways.php') diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php index d47a8a9..0feba2a 100755 --- a/usr/local/www/status_gateways.php +++ b/usr/local/www/status_gateways.php @@ -72,10 +72,10 @@ include("head.inc"); - - - - + + + + $gateway) { ?> @@ -118,10 +118,10 @@ include("head.inc"); $online = gettext("Offline"); $bgcolor = "lightcoral"; } elseif (stristr($status['status'], "loss")) { - $online = gettext("Warning, Packetloss"); + $online = gettext("Warning, Packetloss").': '.$status['loss']; $bgcolor = "khaki"; } elseif (stristr($status['status'], "delay")) { - $online = gettext("Warning, Latency"); + $online = gettext("Warning, Latency").': '.$status['delay']; $bgcolor = "khaki"; } elseif ($status['status'] == "none") { $online = gettext("Online"); @@ -134,16 +134,12 @@ include("head.inc"); $online = gettext("Gathering data"); $bgcolor = "lightgray"; } - echo " $online "; - $lastchange = $gateway['lastcheck']; + echo ""; + echo "
$online
"; + $lastchange = $gateways_status[$gname]['lastcheck']; if(!empty($lastchange)) { - $lastchange = explode(" ", $lastchange); - array_shift($lastchange); - array_shift($lastchange); - $lastchange = implode(" ", $lastchange); - printf(gettext("Last check %s"), $lastchange); + echo gettext("Last check:") . '
' . $lastchange; } - echo "
"; ?> -- cgit v1.1