'pseudowires'); print_optionbar_start(); echo('Pseudowires » '); if ($vars['view'] == "detail") { echo(''); } echo(generate_link("Details",$link_array,array('view'=> 'detail'))); if ($vars['view'] == "detail") { echo(''); } echo(" | "); if ($vars['view'] == "minigraphs") { echo(''); } echo(generate_link("Mini Graphs",$link_array,array('view' => "minigraphs"))); if ($vars['view'] == "minigraphs") { echo(''); } print_optionbar_end(); echo(""); foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.port_id = I.port_id AND I.device_id = ? ORDER BY I.ifDescr", array($device['device_id'])) as $pw_a) { $i = 0; while ($i < count($linkdone)) { $thislink = $pw_a['device_id'] . $pw_a['port_id']; if ($linkdone[$i] == $thislink) { $skip = "yes"; } $i++; } $pw_b = dbFetchRow("SELECT * from `devices` AS D, `ports` AS I, `pseudowires` AS P WHERE D.device_id = ? AND D.device_id = I.device_id AND P.cpwVcID = ? AND P.port_id = I.port_id", array($pw_a['peer_device_id'], $pw_a['cpwVcID'])); if (!port_permitted($pw_a['port_id'])) { $skip = "yes"; } if (!port_permitted($pw_b['port_id'])) { $skip = "yes"; } if ($skip) { unset($skip); } else { if ($bg == "ffffff") { $bg = "e5e5e5"; } else { $bg="ffffff"; } echo(""); echo(""); if ($vars['view'] == "minigraphs") { echo(""); } $linkdone[] = $pw_b['device_id'] . $pw_b['port_id']; } } echo("
".$pw_a['cpwVcID']."".generate_port_link($pw_a)." ".generate_device_link($pw_b)."".generate_port_link($pw_b)."
".$pw_a['ifAlias']."".$pw_b['ifAlias']."
"); if ($pw_a) { $pw_a['width'] = "150"; $pw_a['height'] = "30"; $pw_a['from'] = $config['time']['day']; $pw_a['to'] = $config['time']['now']; $pw_a['bg'] = $bg; $types = array('bits','upkts','errors'); foreach ($types as $graph_type) { $pw_a['graph_type'] = "port_".$graph_type; print_port_thumbnail($pw_a); } } echo(""); if ($pw_b) { $pw_b['width'] = "150"; $pw_b['height'] = "30"; $pw_b['from'] = $config['time']['day']; $pw_b['to'] = $config['time']['now']; $pw_b['bg'] = $bg; $types = array('bits','upkts','errors'); foreach ($types as $graph_type) { $pw_b['graph_type'] = "port_".$graph_type; print_port_thumbnail($pw_b); } } echo("
"); ?>