<% if can? :manage, RadioProfile%> <%= link_to new_radio_profile_path, class: "btn btn-info" do %> Add Radio Profile <% end -%> <% end -%>

<% if ((can? :manage, RadioProfile) || (can? :update, RadioProfile)) %> <% end %> <% if !default_radio.blank? %> <%# === 2.4 GHz === %> <% dr_24 = default_radio['RADIO_SETTINGS'].find{|s| s['BAND'].to_i == 1 } %> <%# === 5 GHz === %> <% dr_5 = default_radio['RADIO_SETTINGS'].find{|s| s['BAND'].to_i == 2 } %> <%# === 6 GHz === %> <% dr_6 = default_radio['RADIO_SETTINGS'].find{|s| s['BAND'].to_i == 3 } %> <% if (can? :manage, RadioProfile) || (can? :update, RadioProfile) %> <% end %> <% end %> <% (radio_profiles || []).each do |radio| %> <%# === 2.4 GHz === %> <% r_24 = radio.radio_settings.find{|s| s.band == "2.4" } %> <%# === 5 GHz === %> <% r_5 = radio.radio_settings.find{|s| s.band == "5" } %> <%# === 6 GHz === %> <% r_6 = radio.radio_settings.find{|s| s.band == "6" } %> <% if ((can? :manage, RadioProfile) || (can? :update, RadioProfile)) %> <% end %> <%end%>
Name Country Radio Settings 2.4 GHz 5 GHz 6 GHz APs / NetworksAction
Channel Power Channel Power Channel Power
<%= default_radio['NAME'] %> <%= default_radio["COUNTRY_CODE"] %> <% default_radio['RADIO_SETTINGS'].each do |value| -%>

' title="<%= value['DISABLE'].to_i == 0 ? "Enabled" : "Disabled" %>"><%= value['BAND'].to_i == 1 ? "2.4 Ghz" : value['BAND'].to_i == 2 ? "5 Ghz" : "6 Ghz" %>

<% end -%>
<%= dr_24 ? (dr_24['ACS_LIST'].present? ? "Auto(#{dr_24['ACS_LIST'].join(", ")})" : (dr_24['CHANNEL'] == "0" ? "Auto" : dr_24['CHANNEL'])) : "Disabled" %> <%= dr_24 ? (dr_24['TXPOWER'] == "0" ? "Auto" : dr_24['TXPOWER']) : "Disabled" %><%= dr_5 ? (dr_5['ACS_LIST'].present? ? "Auto(#{dr_5['ACS_LIST'].join(", ")})" : (dr_5['CHANNEL'] == "0" ? "Auto" : dr_5['CHANNEL'])) : "Disabled" %> <%= dr_5 ? (dr_5['TXPOWER'] == "0" ? "Auto" : dr_5['TXPOWER']) : "Disabled" %><%= dr_6 ? (dr_6['ACS_LIST'].present? ? "Auto(#{dr_6['ACS_LIST'].join(", ")})" : (dr_6['CHANNEL'] == "0" ? "Auto" : dr_6['CHANNEL'])) : "Disabled" %> <%= dr_6 ? (dr_6['TXPOWER'] == "0" ? "Auto" : dr_6['TXPOWER']) : "Disabled" %>

DEFAULT

<%= link_to 'Clone', radio_profiles_path(clone: true), method: :post, :class => "label label-info" %>
<%= radio.name %> <%= radio.country_code %> <% radio.radio_settings.each do |value| -%>

"><%= value.band %> Ghz

<% end -%>
<%= r_24 && r_24.is_disable != true ? ((r_24.valid_auto_channel.first.present? || r_24.valid_auto_channel.last.present?) && r_24.channel == 0 ? "Auto(#{r_24.valid_auto_channel.reject(&:blank?).join(", ")})" : (r_24.try(:channel) != 0 ? r_24.try(:channel) : "Auto")) : "Disabled"%> <%= r_24 && r_24.is_disable != true ? (r_24.try(:power) != 0 ? r_24.try(:power) : "Auto") : "Disabled"%><%= r_5 && r_5.is_disable != true ? ((r_5.valid_auto_channel.first.present? || r_5.valid_auto_channel.last.present?) && r_5.channel == 0 ? "Auto(#{r_5.valid_auto_channel.reject(&:blank?).join(", ")})" : (r_5.try(:channel) != 0 ? r_5.try(:channel) : "Auto")) : "Disabled"%> <%= r_5 && r_5.is_disable != true ? (r_5.try(:power) != 0 ? r_5.try(:power) : "Auto") : "Disabled"%><%= r_6 && r_6.is_disable != true ? ((r_6.valid_auto_channel.first.present? || r_6.valid_auto_channel.last.present?) && r_6.channel == 0 ? "Auto(#{r_6.valid_auto_channel.reject(&:blank?).join(", ")})" : (r_6.try(:channel) != 0 ? r_6.try(:channel) : "Auto")) : "Disabled"%> <%= r_6 && r_6.is_disable != true ? (r_6.try(:power) != 0 ? r_6.try(:power) : "Auto") : "Disabled"%> <% radio.config_mappings.each do |list|%> <% unless list.resourceable.blank?%> <%name,path,title = show_tags(list,:radio_profiles) %> <%= link_to name, path ,:class=>"label label-primary",:title => title%>   <% end %> <% end %> <% if (can? :update, RadioProfile) %> <%= link_to 'Edit', edit_radio_profile_path(radio), :class => "label label-info" %> <% end %> <% if (can? :manage, RadioProfile) %> <%= link_to 'Destroy', radio_profile_path(radio), :method => :delete, :class=>"label label-danger", :confirm => "Are you sure you want to delete?" %> <% end %>