<%#=render :partial=>"shared/top_bar"%>
<% if @location_networks.blank? %> <%= render :partial => 'shared/no_network_msg' %> <% else %> <% if @current_network.timezone.blank? -%>
Timezone for your network is not configured yet. Currently default timezone(UTC) is being used for showing graph. Please Configure it here.
<% end -%>
<%if params["t"] == "sw"%>
<%else%>
<%end%>

Network SSIDs <%if @current_network.vendor_type != "3" %><%if true %><% if (can? :manage, NetworkSsid) -%><%= link_to " Add SSID".html_safe, new_home_configuration_path(@current_network), :class=>"btn btn-info" %><% end -%><%else%> Maximum number (16) SSID for the network<%end%><%end%>

<%#= form_tag bulk_update_home_configuration_index_path(@current_network.id), method: :put do %> <% if false -%>
Associate / Dissociate - AP / Tags
<%= label_tag "Associate:" %>
<%= select_tag "tag[add]", grouped_options_for_select(@aps_collection), :class => 'tags-ssid', :multiple => true, :style => "width:200px" %> <%= button_tag "Associate", :id => "btn-submit-tag-assign", :class=>"btn btn-sm btn-success", :value => "Associate" %>
<%= label_tag "Dissociate:" %>
<%= select_tag "tag[remove]", grouped_options_for_select(@aps_collection), :class => 'tags-ssid', :multiple => true, :style => "width:200px" %> <%= button_tag "Dissociate", :id => "btn-submit-tag-", :class=>"btn btn-sm btn-success", :value => "dissociate" %>

<% end -%> <% if false %><% end -%> <% if (can? :manage, NetworkSsid) -%><% end -%> <%if @network_ssid.count > 0 %> <%@network_ssid.each do |x| %> <% if false %><% end -%> <% if (can? :manage, NetworkSsid) -%> <% else %> <% end %> <% if x.ssid_mode == "1" %> <% else %> <% end %> <%#= "1".eql?(x.ssid_mode) ? "N/A" : x.v_lan.try(:v_lan_id) %> <% if (can? :manage, NetworkSsid) -%> <% end -%> <%end%> <% else %> <%end%>
<%= check_box_tag("select_all", nil, nil, :class => "table-select-all") %>Name Enabled Association Band Mode VLAN ID Captive Portal AP's Actions
<%= check_box_tag("network_ssids[]",x.id,nil,:class => "inventory-select table-row-check") %><%=link_to x.ssid_name,edit_home_configuration_path(@current_network,x),:class=>"" %><%=x.ssid_name %> <% if (can? :manage, NetworkSsid) -%> <%= check_box_tag(:is_enabled, true, x.is_enabled, "data-url"=>change_ssid_state_home_configuration_path(@current_network,x), :id => "is_enabled_#{x.id}") %> <% else -%> <%= check_box_tag(:is_enabled, true, x.is_enabled, "data-url"=>change_ssid_state_home_configuration_path(@current_network,x), :disabled => 'disabled', :id => "is_enabled_#{x.id}") %> <% end -%> <%= x.security_mode.try(:camelcase) %> <% x.radio_bands.each do |s|%> <%= ssid_band(s) %>  <%# if x.radio_band == "both" %> <%# else %> <%# end %> <% end %> <%= "1".eql?(x.ssid_mode) ? "Router" : "Bridge" %><%= "N/A" %><%= x.v_lan.present? ? (x.v_lan.v_lan_id == "1" ? "Default" : (x.v_lan.v_lan_id == "0" ? "Disabled" : (x.v_lan.v_lan_id))) : "" %><%= "0".eql?(x.captive_portal) ? "Disabled" : "Enabled" %> <% collection_of_config_mappings(x.associated_aps_and_tags).each do |k, v| %> <% v.each do |value| -%> <%= value %> <% end -%> <% end -%> <%=link_to 'Edit',edit_home_configuration_path(@current_network,x),:class=>"label-info label"%> <%= @current_network.network_ssids.count > 1 ? link_to("Delete",home_configuration_path(@current_network,x),method: :delete, data: { confirm: 'Are you sure you want to delete?' },:class=>"label label-danger") : '' %>
No Network SSIDs Found
<%# end -%>

Wired Configuration<% if (can? :manage, WiredConfig) -%><%= link_to " Add Switch".html_safe, new_home_wired_config_path(@current_network), :class=>"btn btn-info" %><% end -%>

<% if false %><% end -%> <% if (can? :manage, WiredConfig) -%><% end -%> <%if @network_wired_configs.count > 0 %> <%@network_wired_configs.each do |x| %> <% if false %><% end -%> <%if can? :manage,WiredConfig%> <%else%> <% end %> <% if (can? :manage, WiredConfig) -%> <% end -%> <%end%> <% else %> <%end%>
<%= check_box_tag("select_all", nil, nil, :class => "table-select-all") %>Name Port AP's Actions
<%= check_box_tag("wired_configs[]",x.id,nil,:class => "inventory-select table-row-check") %><%=link_to x.name, edit_home_wired_config_path(@current_network, x),:class=>"" %><%= x.name %><%= "1".eql?(x.custom_port) ? "Disabled" : "Enabled" %> <% collection_of_config_mappings(x.associated_resources).each do |k, v| %> <% v.each do |value| -%> <%= value %> <% end -%> <% end -%> <%=link_to 'Edit', edit_home_wired_config_path(@current_network, x),:class=>"label-info label" %> <%= link_to("Delete", home_wired_config_path(@current_network, x),method: :delete, data: { confirm: 'Are you sure you want to delete?' },:class=>"label label-danger")%>
No Switch Configuration Found

VLAN<% if (can? :manage, VLan) -%><%=link_to " Add VLAN".html_safe,new_v_lan_path, {:class => "btn btn-info add_vlan",'data-url' => new_v_lan_path} %><% end -%>

<% if (can? :manage, VLan) -%><% end -%> <%if @network_vlans.count > 0 %> <% @network_vlans.each do |vlan| %> <% if (can? :manage, VLan) -%> <% end %> <% else %> <%end%>
VLAN ID IP Netmask NAT DHCP Server Captive PortalActions
<%= vlan.v_lan_id == '1' ? "Default" : vlan.v_lan_id %> <%= vlan.ip_address %> <%= vlan.net_mask %> <%= VLan::FORM_CONST[vlan.nat] %> <%= VLan::DHCP_SERVER[vlan.dhcp_relay_server || ""] %> <%= "0".eql?(vlan.captive_portal) ? "Disabled" : "Enabled" %><%= link_to 'Edit', edit_v_lan_path(vlan),:class=>"edit_vlan label-info label", :data => {:url => edit_v_lan_path(vlan)} %> <%# if vlan.v_lan_id != "1" %> <%= link_to 'Delete', v_lan_path(vlan), :method => :delete, :class=>"del_vlan label-danger label", :data => {:method=>'delete'} %> <%# end %> <% end %>
No VLAN Found
<%if params["t"] == "sw"%>
<%else%>
<%end%>

Switch Configuration <% if can? :manage, SwitchConfiguration %> <%= link_to new_switch_configuration_path, class: "btn btn-info" do %> Configure Switches <% end -%> <% end -%>

<% if can? :manage, SwitchConfiguration %><% end %> <% (@switch_configurations || []).each do |switch_config| %> <% if can? :manage, SwitchConfiguration %> <% end %> <%end%>
Model Ports configured / Available Switches / NetworksAction
<%= switch_config.hardware_part.name %> <%= switch_config.configured_switch_ports.count %> / <%= switch_config.hardware_part.port_count %> <% switch_config.config_mappings.each do |list|%> <% unless list.resourceable.blank?%> <%name,path,title = show_tags(list,:switch_configurations) %> <%= link_to name, path ,:class=>"label label-primary",:title => title%>   <% end %> <% end %> <%= link_to 'Edit', edit_switch_configuration_path(switch_config), :class => "label label-info" %> <%= link_to 'Destroy', switch_configuration_path(switch_config), :method => :delete, :class=>"label label-danger", :confirm => "Are you sure you want to delete?" %>
<%end%>
<%= render :partial => "monitoring/top_bar" %> <%unless @location_networks.blank?%> <%end%>