"); echo(" "); echo(""); foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.device_id = P.device_id ORDER BY D.hostname") as $proc) { if (device_permitted($proc['device_id'])) { $device = $proc; # FIXME should that really be done here? :-) $text_descr = $proc['processor_descr']; $text_descr = str_replace("Routing Processor", "RP", $text_descr); $text_descr = str_replace("Switching Processor", "SP", $text_descr); $text_descr = str_replace("Sub-Module", "Module ", $text_descr); $text_descr = str_replace("DFC Card", "DFC", $text_descr); $proc_url = "device/".$device['device_id']."/health/processor/"; $mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f400"; $proc_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$text_descr; $proc_popup .= "
"; $proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; $perc = round($proc['processor_usage']); $background = get_percentage_colours($perc); echo(" '); if ($vars['view'] == "graphs") { echo(' "); } #end graphs if } } echo("
Device Processor Usage
".generate_device_link($proc)." " . $text_descr . " ".print_percentage_bar (400, 20, $perc, $perc."%", "ffffff", $background['left'], (100 - $perc)."%" , "ffffff", $background['right'])); echo('
'); $daily_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=211&height=100"; $daily_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=400&height=150"; $weekly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=211&height=100"; $weekly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=400&height=150"; $monthly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=211&height=100"; $monthly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=400&height=150"; $yearly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=211&height=100"; $yearly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=400&height=150"; echo(" ', LEFT);\" onmouseout=\"return nd();\"> "); echo(" ', LEFT);\" onmouseout=\"return nd();\"> "); echo(" ', LEFT);\" onmouseout=\"return nd();\"> "); echo(" ', LEFT);\" onmouseout=\"return nd();\"> "); echo("
"); echo(""); ?>