'Basic', 'graphs' => 'Graphs', ); if (!$_GET['optb']) { $_GET['opta'] = "basic"; } echo('CEF » '); $sep = ""; foreach ($menu_options as $option => $text) { echo($sep); if ($_GET['optb'] == $option) { echo(""); } echo('' . $text . ''); if ($_GET['optb'] == $option) { echo(""); } $sep = " | "; } unset($sep); print_optionbar_end(); echo('
'); $cef_query = mysql_query("SELECT * FROM `cef_switching` WHERE `device_id` = '".$device['device_id']."' ORDER BY `entPhysicalIndex`, `afi`, `cef_index`"); echo(''); $i=0; while ($cef = mysql_fetch_assoc($cef_query)) { $entity_query = mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$device['device_id']."' AND `entPhysicalIndex` = '".$cef['entPhysicalIndex']."'"); $entity = mysql_fetch_assoc($entity_query); if (!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; } $interval = $cef['updated'] - $cef['updated_prev']; if(!$entity['entPhysicalModelName'] && $entity['entPhysicalContainedIn']) { $parent_entity_query = mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$device['device_id']."' AND `entPhysicalIndex` = '".$entity['entPhysicalContainedIn']."'"); $parent_entity = mysql_fetch_assoc($parent_entity_query); $entity_descr = $entity['entPhysicalName'] . " (" . $parent_entity['entPhysicalModelName'] .")"; } else { $entity_descr = $entity['entPhysicalName'] . " (" . $entity['entPhysicalModelName'] .")"; } echo(""); echo(""); echo(""); echo(""); echo(" "); if($_GET['opta'] == "graphs") { $graph_array['height'] = "100"; $graph_array['width'] = "215"; $graph_array['to'] = $now; $graph_array['id'] = $cef['cef_switching_id']; $graph_array['type'] = "cefswitching_graph"; echo(""); } $i++; } echo("
Entity AFI Path Drop Punt Punt2Host
".$entity_descr." ".$cef['afi']." "); switch ($cef['cef_path']) { case "RP RIB": echo 'RP RIB'; break; case "RP LES": echo 'RP LES'; break; case "RP PAS": echo 'RP PAS'; break; default: echo $cef['cef_path']; } echo("".format_si($cef['drop'])); if($cef['drop'] > $cef['drop_prev']) { echo(" (".round(($cef['drop']-$cef['drop_prev'])/$interval,2)."/sec)"); } echo("".format_si($cef['punt'])); if($cef['punt'] > $cef['punt_prev']) { echo(" (".round(($cef['punt']-$cef['punt_prev'])/$interval,2)."/sec)"); } echo("".format_si($cef['punt'])); if($cef['punt2host'] > $cef['punt2host_prev']) { echo(" (".round(($cef['punt2host']-$cef['punt2host_prev'])/$interval,2)."/sec)"); } echo("
"); include("includes/print-quadgraphs.inc.php"); echo("
"); ?>