* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2023 Observium Limited * */ echo generate_box_open(); $dirs = []; if (isset($port_attribs['sros_egress_queues'])) { $dirs['Egress'] = 'Egress'; } if (isset($port_attribs['sros_ingress_queues'])) { $dirs['Ingress'] = 'Ingress'; } $graphs = ['FwdInProfOcts' => 'Forwarded In-Profile Traffic', 'FwdOutProfOcts' => 'Forwarded Out-Profile Traffic', 'FwdInProfPkts' => 'Forwarded In-Profile Packets', 'FwdOutProfPkts' => 'Forwarded Out-Profile Packets', 'DroInProfOcts' => 'Dropped In-Profile Traffic', 'DroOutProfOcts' => 'Dropped Out-Profile Traffic', 'DroInProfPkts' => 'Dropped In-Profile Packets', 'DroOutProfPkts' => 'Dropped Out-Profile Packets']; $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('' . ucfirst($dir) . ' ' . $label . ''); foreach (['bits', 'pkts'] as $metric) { $graph_array['type'] = "port_sros_queue"; $graph_array['queue'] = $queue; $graph_array['dir'] = $dir; $graph_array['metric'] = $metric; print_graph_row_port($graph_array, $port); unset($graph_array['queue']); unset($graph_array['dir']); unset($graph_array['metric']); } echo(' | ');
}
}
} elseif ($vars['subview'] == 'overview') {
foreach ($dirs as $dir) {
foreach ($graphs as $type => $text) {
echo('
');
echo('' . $dir . ' ' . $text . ''); $graph_array['type'] = "port_sros_" . $dir . $type; print_graph_row_port($graph_array, $port); echo(' |