");
$hrdevices = mysql_query("SELECT * FROM `hrDevice` WHERE `device_id` = '".$device['device_id']."'");
while($hrdevice = mysql_fetch_array($hrdevices)) {
echo("
".$hrdevice['hrDeviceIndex']." | ");
if($hrdevice['hrDeviceType'] == "hrDeviceProcessor") {
$proc_id = mysql_result(mysql_query("SELECT processor_id FROM processors WHERE device_id = '".$device['device_id']."' AND hrDeviceIndex = '".$hrdevice['hrDeviceIndex']."'"),0);
$proc_url = $config['base_url'] . "/device/".$device['device_id']."/health/processors/";
$proc_popup = "onmouseover=\"return overlib('".$device['hostname']." - ".$hrdevice['hrDeviceDescr'];
$proc_popup .= "
";
$proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
echo("".$hrdevice['hrDeviceDescr']." | ");
} elseif ($hrdevice['hrDeviceType'] == "hrDeviceNetwork") {
$int = str_replace("network interface ", "", $hrdevice['hrDeviceDescr']);
$interface = mysql_fetch_array(mysql_query("SELECT * FROM ports WHERE device_id = '".$device['device_id']."' AND ifDescr = '".$int."'"));
if($interface['ifIndex']) {
echo("".generateiflink($interface)." | ");
} else {
echo("".$hrdevice['hrDeviceDescr']." | ");
}
} else {
echo("".$hrdevice['hrDeviceDescr']." | ");
}
echo("".$hrdevice['hrDeviceType']." | ".$hrdevice['hrDeviceStatus']." | ");
echo("".$hrdevice['hrDeviceErrors']." | ".$hrdevice['hrProcessorLoad']." | ");
echo("
");
}
echo("");
?>