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
This commit is contained in:
Adam Amstrong
2012-05-17 12:02:55 +00:00
parent 1d3c5bcf17
commit 32f7259c7b

View File

@@ -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'));