* * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ function find_child($components, $parent, $level) { global $vars; foreach ($components as $id => $array) { if ($array['qos-type'] == 3) { continue; } if (($array['parent'] == $components[$parent]['sp-obj']) && ($array['sp-id'] == $components[$parent]['sp-id'])) { echo ""; } } } if (!isset($vars['policy'])) { // not set, find the first parent and use it. foreach ($components as $id => $array) { if (($array['qos-type'] == 1) && ($array['ifindex'] == $port['ifIndex']) && ($array['parent'] == 0)) { // Found the first policy $vars['policy'] = $id; continue; } } } echo "\n\n"; // Display the ingress policy at the top of the page. echo "
'; // Display the egress policy at the top of the page. echo "
\n\n"; // Let's make sure the policy we are trying to access actually exists. foreach ($components as $id => $array) { if (($array['qos-type'] == 1) && ($array['ifindex'] == $port['ifIndex']) && ($id == $vars['policy'])) { // The policy exists. echo "
 
\n\n"; // Display each graph row. echo "
"; echo "
Traffic by CBQoS Class - ".$components[$vars['policy']]['label']."
"; $graph_array['policy'] = $vars['policy']; if (isset($vars['class'])) { $graph_array['class'] = $vars['class']; } $graph_type = 'port_cbqos_traffic'; include 'includes/print-interface-graphs.inc.php'; echo "
QoS Drops by CBQoS Class - ".$components[$vars['policy']]['label']."
"; $graph_array['policy'] = $vars['policy']; if (isset($vars['class'])) { $graph_array['class'] = $vars['class']; } $graph_type = 'port_cbqos_bufferdrops'; include 'includes/print-interface-graphs.inc.php'; echo "
Buffer Drops by CBQoS Class - ".$components[$vars['policy']]['label']."
"; $graph_array['policy'] = $vars['policy']; if (isset($vars['class'])) { $graph_array['class'] = $vars['class']; } $graph_type = 'port_cbqos_qosdrops'; include 'includes/print-interface-graphs.inc.php'; echo "
\n\n"; } }