Generate full device array for event log, making popover graphs the correct ones in the process

git-svn-id: http://www.observium.org/svn/observer/trunk@1777 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-02-02 11:59:08 +00:00
parent 3aaefb77e1
commit 3d07352212
2 changed files with 4 additions and 4 deletions

View File

@ -3,11 +3,12 @@
function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0)
{
global $twoday; global $day; global $now; global $config;
if (!$start) { $start = $day; }
if (!$end) { $end = $now; }
$class = devclass($device);
if (!$text) { $text = $device['hostname']; }
if (isset($config['os'][$device['os']]['over']))
{
$graphs = $config['os'][$device['os']]['over'];
@ -26,7 +27,6 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
if($device['hardware']) { $contents .= " - ".$device['hardware']; }
$contents .= "</div>";
$contents .= "<div>";
if($device['os']) { $contents .= mres($config['os'][$device['os']]['text']); }
if($device['version']) { $contents .= " ".mres($device['version']); }
@ -34,6 +34,7 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
# if($device['hardware']) { $contents .= " - ".$device['hardware']; }
$contents .= "</div>";
# if (isset($device['location'])) { $contents .= "" . htmlentities($device['location'])."<br />"; }
foreach ($graphs as $entry)
{