move percentage colour mappings to function. make graphs for memory/storage match percentage colours (should we do this for others?)

git-svn-id: http://www.observium.org/svn/observer/trunk@2160 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-25 17:15:36 +00:00
parent e5fe2fb0ec
commit efd9d30ee7
18 changed files with 82 additions and 114 deletions

View File

@@ -1,5 +1,18 @@
<?php
function get_percentage_colours($percentage)
{
if ($percentage > '90') { $background['left']='c4323f'; $background['right']='C96A73'; }
elseif ($percentage > '75') { $background['left']='bf5d5b'; $background['right']='d39392'; }
elseif ($percentage > '50') { $background['left']='bf875b'; $background['right']='d3ae92'; }
elseif ($percentage > '25') { $background['left']='5b93bf'; $background['right']='92b7d3'; }
else { $background['left']='9abf5b'; $background['right']='bbd392'; }
return($background);
}
function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0)
{
global $twoday, $day, $now, $config;
@@ -388,4 +401,4 @@ function getlocations()
return $locations;
}
?>
?>