VPN Configuration List

<% (vpn_list || []).each do |vpn|%> <%end%>
Name AP Enable VPN Type Action
<%= vpn.name %> <% x = vpn.config_mappings.first.try(:resourceable) %> <% unless x.blank? %> <%= @inventory_up_list.include?(x.mac_id) ? 'up' : 'down' %>   <%mac = ap_info(x)%> <%= mac[0] %>
<%= mac[1] if mac[1].present? %> <% end %>
<%= check_box_tag(:is_enabled, vpn.is_enabled,vpn.is_enabled == "1", :class => 'bs-switch', "data-url"=>enable_disable_vpn_inventory_index_path(:id => vpn.id), :id => "is_enabled_#{vpn.id}") %> <% if vpn.protocol == "Wireguard"%> <%= 'Wireguard' %> <% else %> <%= 'IPSec' %> <% end %> <% if can? :manage,VpnConfig%> <%= link_to 'Edit', vpn_config_inventory_index_path(:id => vpn.id),:class=>"label label-info" %> <%= link_to 'Clone', clone_vpn_inventory_index_path(:vpn_id => vpn.id),:class=>"label label-info" %> <%= link_to 'Destroy', create_update_vpn_inventory_index_path(:id => vpn.id),method: :post, data: { confirm: 'Are you sure you want to delete?' },:class=>"label label-danger" %> <% end %>