* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2023 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 (['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, ['subview' => $subview]); $navbar['options'][$subview]['text'] = $text; } print_navbar($navbar); echo generate_box_open(); ?> '); } } elseif ($vars['subview'] == 'overview') { $graphs = ['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('

' . ucfirst($dir) . ' Queue ' . $text . '

'); foreach (['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('
'; echo '

' . $text . '

'; $graph_array['type'] = 'port_jnx_' . $graphtype; print_graph_row_port($graph_array, $port); echo '