* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited * */ foreach(json_decode($attribs['jnx_cos_queues'], TRUE) as $data) { if(isset($data['queue'])) { $queues[$data['queue']] = $data; } } $navbar['class'] = "navbar-narrow"; $navbar['brand'] = "CoS Queues"; foreach (array('overview' => 'Overview', 'queues' => 'Per-Queue') as $subview => $text) { if(!isset($vars['subview'])) { $vars['subview'] = $subview; } if ($vars['subview'] == $subview) { $navbar['options'][$subview]['class'] = "active"; } $navbar['options'][$subview]['url'] = generate_url($vars,array('subview'=>$subview)); $navbar['options'][$subview]['text'] = $text; } print_navbar($navbar); echo generate_box_open(); ?>
');
echo(''.ucfirst($dir).' Queue '.$text.''); foreach(array('bits', 'pkts') as $metric) { $graph_array['type'] = "port_jnx_cos_queue"; $graph_array['queue'] = $queue; $graph_array['metric'] = $metric; print_graph_row_port($graph_array, $port); unset($graph_array['queue']); unset($graph_array['metric']); } echo(' | ');
}
} elseif($vars['subview'] == 'overview') {
$graphs = array('QedBytes' => 'Queued Bits',
'QedPkts' => 'Queued Packets',
'TailDropPkts' => 'Tail Dropped Packets',
'TotalRedDropPkts' => 'RED Dropped Packets',
'TotalRedDropBytes' => 'RED Dropped Bits',
);
foreach($graphs as $graphtype => $text)
{
echo '
';
echo ''.$text.''; $graph_array['type'] = 'port_jnx_'.$graphtype; print_graph_row_port($graph_array, $port); echo ' |