'device', 'device' => $device['device_id'], 'tab' => 'routing', 'proto' => 'ipsec_tunnels'); $navbar['options_right']['details']['text'] = 'No Graphs'; if ($vars['view'] == 'details') { $navbar['options_right']['details']['class'] .= ' active'; } $navbar['options_right']['details']['url'] = generate_url($vars, array('view' => 'details', 'graph' => 'NULL')); $navbar['options_right']['bits']['text'] = 'Bits'; if ($vars['graph'] == 'bits') { $navbar['options_right']['bits']['class'] .= ' active'; } $navbar['options_right']['bits']['url'] = generate_url($vars, array('view' => 'graphs', 'graph' => 'bits')); $navbar['options_right']['pkts']['text'] = 'Packets'; if ($vars['graph'] == 'pkts') { $navbar['options_right']['pkts']['class'] .= ' active'; } $navbar['options_right']['pkts']['url'] = generate_url($vars, array('view' => 'graphs', 'graph' => 'pkts')); $navbar['class'] = 'navbar-narrow'; $navbar['brand'] = 'IPSec Tunnels'; print_navbar($navbar); switch ($vars['view']) { case 'bits': case 'pkts': $table_class = 'table-striped-two'; break; default: $table_class = 'table-striped'; } echo generate_box_open(); echo '
Local address | Peer address | Tunnel name | State | ||||||
---|---|---|---|---|---|---|---|---|---|
' . generate_popup_link('ip', $tunnel['local_addr']) . ' | » | ' . generate_popup_link('ip', $tunnel['peer_addr']) . ' | ' . $tunnel['tunnel_name'] . ' | ' . $tunnel_endpoint . ' | ' . generate_tooltip_link(NULL, format_uptime($tunnel['tunnel_lifetime'], 'short-3'), $tunnel['tunnel_lifetime'] . ' sec') . ' | ' . $tunnel['tunnel_ike_alive'] . ' | ' . generate_tooltip_link(NULL, format_uptime($tunnel['tunnel_ike_lifetime'], 'short-3'), $tunnel['tunnel_ike_lifetime'] . ' sec') . ' | ' . generate_tooltip_link(NULL, format_uptime($timediff, "short-3"). ' ago', format_unixtime($tunnel['tunnel_added'])) . ' | |
'); print_graph_row($graph_array); echo(' |