'device', 'device' => $device['device_id'], 'tab' => 'routing', 'proto' => 'ipsec_tunnels', ]; print_optionbar_start(); echo "IPSEC Tunnels » "; $menu_options = [ 'basic' => 'Basic', ]; if (! isset($vars['view'])) { $vars['view'] = 'basic'; } echo "VRFs » "; $menu_options = [ 'basic' => 'Basic', ]; if (! $_GET['opta']) { $_GET['opta'] = 'basic'; } $sep = ''; foreach ($menu_options as $option => $text) { if ($vars['view'] == $option) { echo " '; } echo ' | '; } echo ' Graphs: '; $graph_types = [ 'bits' => 'Bits', 'pkts' => 'Packets', ]; foreach ($graph_types as $type => $descr) { echo "$type_sep"; if ($vars['graph'] == $type) { echo " '; } $type_sep = ' | '; } print_optionbar_end(); $tunnel = dbFetchRows('SELECT * FROM `ipsec_tunnels` WHERE `device_id` = ? ORDER BY `peer_addr`', [ $device['device_id'], ]); if (is_null($vars['graph'])) { $tunnel_label = 'warning'; echo '
Local Identity | Remote Identity | Name | Status |
---|---|---|---|
' . $local_addr . ' | ' . $remote_addr . ' | ' . htmlentities($entry['tunnel_name']) . ' | ' . htmlentities($entry['tunnel_status']) . ' |