From 6109cf17668eef7aa16ba1afe9e3d3e6017490e5 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Fri, 18 May 2012 15:17:49 +0000 Subject: [PATCH] minor improvement to globe tooltip formatting git-svn-id: http://www.observium.org/svn/observer/trunk@3207 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/front/globe.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/html/pages/front/globe.php b/html/pages/front/globe.php index 73f2cd6d19..abf16d810a 100644 --- a/html/pages/front/globe.php +++ b/html/pages/front/globe.php @@ -16,16 +16,18 @@ foreach (getlocations() as $location) $devices = array(); $devices_down = array(); + $devices_up = array(); $count = 0; $down = 0; foreach (dbFetchRows("SELECT * FROM devices WHERE location = ?", array($location)) as $device) { $devices[] = $device['hostname']; + $devices_up[] = $device; $count++; - if ($device['status'] == "0") { $down++; $devices_down[] = $device['hostname']; } + if ($device['status'] == "0" && $device['disabled'] == "0" && $device['ignore'] == "0") { $down++; $devices_down[] = $device['hostname']." DOWN"; } } - if (empty($devices_down)) { $devices_down[] = "No Problems"; } + $devices_down = array_merge(array(count($devices_up). " Devices OK"), $devices_down); if ($down > 0) { $locations_down[] = "['".$location."', 100, '".implode(", ", $devices_down)."']";