'device', 'device' => $device['device_id'], 'tab' => 'ports', ]; print_optionbar_start(); $menu_options['basic'] = 'Basic'; $menu_options['details'] = 'Details'; $menu_options['arp'] = 'ARP Table'; $menu_options['fdb'] = 'FDB Table'; if (dbFetchCell("SELECT * FROM links AS L, ports AS I WHERE I.device_id = '" . $device['device_id'] . "' AND I.port_id = L.local_port_id")) { $menu_options['neighbours'] = 'Neighbours'; } if (DeviceCache::getPrimary()->portsAdsl()->exists() || DeviceCache::getPrimary()->portsVdsl()->exists()) { $menu_options['xdsl'] = 'xDSL'; } $sep = ''; foreach ($menu_options as $option => $text) { echo $sep; if ($vars['view'] == $option) { echo "'; } $sep = ' | '; } unset($sep); echo ' | Graphs: '; $graph_types = [ 'bits' => 'Bits', 'upkts' => 'Unicast Packets', 'nupkts' => 'Non-Unicast Packets', 'errors' => 'Errors', ]; if (Config::get('enable_ports_etherlike')) { $graph_types['etherlike'] = 'Etherlike'; } $type_sep = ''; $vars['graph'] = $vars['graph'] ?? ''; foreach ($graph_types as $type => $descr) { echo $type_sep; if ($vars['graph'] == $type && $vars['view'] == 'graphs') { echo "'; } echo ' ('; if ($vars['graph'] == $type && $vars['view'] == 'minigraphs') { echo "'; } echo ')'; $type_sep = ' | '; }//end foreach print_optionbar_end(); if ($vars['view'] == 'minigraphs') { $timeperiods = [ '-1day', '-1week', '-1month', '-1year', ]; $from = '-1day'; echo "
| Port | Port Group | Traffic | Speed | Media | Mac Address |
|---|