From 32f7259c7b71ee1a885996491d5a8c4fd2c0604b Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 17 May 2012 12:02:55 +0000 Subject: [PATCH] force sites with downed devices to the front of the map always. git-svn-id: http://www.observium.org/svn/observer/trunk@3202 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/front/globe.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/html/pages/front/globe.php b/html/pages/front/globe.php index b9fc58dc8..73f2cd6d1 100644 --- a/html/pages/front/globe.php +++ b/html/pages/front/globe.php @@ -27,13 +27,14 @@ foreach (getlocations() as $location) if (empty($devices_down)) { $devices_down[] = "No Problems"; } - if ($down > 0) { $state = 0; } else { $state = 100; } - - $locations[] = "['".$location."',".$state.", '".implode(", ", $devices_down)."']"; - + if ($down > 0) { + $locations_down[] = "['".$location."', 100, '".implode(", ", $devices_down)."']"; + } else { + $locations_up[] = "['".$location."', 0, '".implode(", ", $devices_down)."']"; + } } -echo(implode(",\n", $locations)); +echo(implode(",\n", array_merge($locations_up, $locations_down))); ?> @@ -46,7 +47,9 @@ echo(implode(",\n", $locations)); width: 1150, height: 500, magnifyingGlass: {enable: true, zoomFactor: 8}, - colorAxis: {minValue: 0, maxValue: 100, colors: ['red', 'green']} + colorAxis: {minValue: 0, maxValue: 100, colors: ['green', 'red']}, + markerOpacity: 0.90, + sizeAxis: {minValue: 10, maxValue: 10} }; var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));