'); $hrdevices = mysql_query("SELECT * FROM `hrDevice` WHERE `device_id` = '".$device['device_id']."' ORDER BY `hrDeviceIndex`"); while ($hrdevice = mysql_fetch_assoc($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 = "device/".$device['device_id']."/health/processor/"; $proc_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$hrdevice['hrDeviceDescr']; $proc_popup .= "
"; $proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; echo("".$hrdevice['hrDeviceDescr'].""); $graph_array['height'] = "20"; $graph_array['width'] = "100"; $graph_array['to'] = $now; $graph_array['id'] = $proc_id; $graph_array['type'] = 'processor_usage'; $graph_array['from'] = $day; $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400"; $mini_graph = overlib_link($proc_url, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL); echo(''.$mini_graph.''); } elseif ($hrdevice['hrDeviceType'] == "hrDeviceNetwork") { $int = str_replace("network interface ", "", $hrdevice['hrDeviceDescr']); $interface = mysql_fetch_assoc(mysql_query("SELECT * FROM ports WHERE device_id = '".$device['device_id']."' AND ifDescr = '".$int."'")); if ($interface['ifIndex']) { echo("".generate_port_link($interface).""); $graph_array['height'] = "20"; $graph_array['width'] = "100"; $graph_array['to'] = $now; $graph_array['id'] = $interface['interface_id']; $graph_array['type'] = 'port_bits'; $graph_array['from'] = $day; $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400"; # FIXME click on graph should also link to port, but can't use generate_port_link here... $mini_graph = overlib_link("#", generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL); echo("$mini_graph"); } else { echo("".$hrdevice['hrDeviceDescr'].""); echo(""); } } else { echo("".$hrdevice['hrDeviceDescr'].""); echo(""); } echo("".$hrdevice['hrDeviceType']."".$hrdevice['hrDeviceStatus'].""); echo("".$hrdevice['hrDeviceErrors']."".$hrdevice['hrProcessorLoad'].""); echo(""); } echo(''); ?>