<commit_before><style type="text/css">
  span.status_time{
    font-weight: normal;
    color: #555;
    font-size:11px;
    font-style: italic;
  }
</style>
<% content_for :title, t('menu.providers') %>
<% heading t('menu.providers') %>
<% render_new_button_for :provider %>

<%= render :partial => "shared/empty_submenu"%>

<div id="busqueda">
<% form_for @search do |f| %>
  <ul> 
    <li>
      <%= f.label :name_like, t('activerecord.attributes.provider.name') %>
      <%= f.text_field :name_like %>
    </li>
    <li>
    <%= f.label :state_equals, t('activerecord.attributes.provider.state') %>
    <%= f.select :state_equals, Provider.aasm_states_for_select, :include_blank => true %>
    </li>
    <li>
    <%= f.label :online_is, t('activerecord.attributes.provider.online') %>
    <%= f.select :online_is, [["online",true],["offline",false]], :include_blank => true %>
    </li>
    <li>
    <%= f.label :provider_group_id_equals, t('activerecord.attributes.provider.provider_group') %>
    <%= f.collection_select :provider_group_id_equals, ProviderGroup.all, :id, :name, :include_blank => true %>
    </li>
    <li>
    <br/>
    <%= f.submit t('buttons.search') %>
    <%= f.submit t('buttons.reset'),{ :type => "button", :class => "reset"}%>
    </li>
  </ul>
<% end %>
</div>

<div class="separador"></div>
  
<div class="main">
  <%= page_entries_info @providers %>
  <table cellspacing="0" cellpadding="0">
    <tbody>
      <tr class="odd">
        <th><%=t 'activerecord.attributes.provider.name' %></th>
        <th><%=t 'activerecord.attributes.provider.interface' %></th>
        <th><%=t 'activerecord.attributes.provider.ip' %></th>
        <th><%=t 'activerecord.attributes.provider.rate_down' %> / <%=t 'activerecord.attributes.provider.rate_up' %></th>
        <th><%=t 'activerecord.attributes.provider.provider_group' %></th>
        <th><%=t 'activerecord.attributes.provider.state' %></th>
        <th><%=t 'activerecord.attributes.provider.online' %></th>
        <%= render :partial => "shared/plugins_table_headers" %>
        <% if current_user.may_update_providers? or current_user.may_index_providers? %>
        <th></th> 
        <% end %>
        <% if current_user.may_destroy_provider?(Provider.new) %>
        <th></th> 
        <% end %>
      </tr>
    
      <% @providers.each_with_index do |provider,i| %>
        <% css_class = i%2 == 0 ? "even" : "odd" %>
        <tr class="<%= css_class %>" >
          <td>
            <%=h provider.name %><br/>
            <%= link_to Graph.new(:element => provider).img("day", "small"), graph_path(provider ,:class => "Provider") %>
          </td>
          <td>
            <% if provider.interface %>
              <span title="link <%= provider.interface.status %>" <%= provider.interface.physical_link ? 'class="enable_color"' : 'class="disable_color"' %>><%=h provider.interface.name %></span><br/>
              <% if provider.kind == 'adsl' %>
                (<%= provider.link_interface %>)
              <% end %>
            <% end %>
          </td>
          <td>
            <%=h provider.ip %><br/>
            <%= provider.addresses.collect{ |a| a.ip}.join("<br/>") %>
          </td>
          <td><%=h provider.rate_down %>/<%=h provider.rate_up %></td>
          <td><%=h provider.provider_group.name rescue 'Undefined' %></td>
          <td><%=h t "aasm.provider.#{provider.state}" %></td>
          <td <%= provider.online ? 'class="enable_color"' : 'class="disable_color"' %>>
            <%=h provider.online ? "online" : "offline" %> <br/>
            <span class="status_time"> Hace <%=h provider.pretty_current_status_time -%> </span>
          </td>
          <%= render :partial => "shared/plugins_table_cells", :locals => {:object => provider} %>
          <% if current_user.may_update_provider?(provider) %><commit_msg>Allow to search by provider.kind<commit_after><style type="text/css">
  span.status_time{
    font-weight: normal;
    color: #555;
    font-size:11px;
    font-style: italic;
  }
</style>
<% content_for :title, t('menu.providers') %>
<% heading t('menu.providers') %>
<% render_new_button_for :provider %>

<%= render :partial => "shared/empty_submenu"%>

<div id="busqueda">
<% form_for @search do |f| %>
  <ul> 
    <li>
      <%= f.label :name_like, t('activerecord.attributes.provider.name') %>
      <%= f.text_field :name_like %>
    </li>
    <li>
    <%= f.label :kind_equals, t('activerecord.attributes.provider.kind') %>
    <%= f.select :kind_equals, Provider.kinds_for_select, :include_blank => true %>
    </li>
    <li>
    <%= f.label :state_equals, t('activerecord.attributes.provider.state') %>
    <%= f.select :state_equals, Provider.aasm_states_for_select, :include_blank => true %>
    </li>
    <li>
    <%= f.label :online_is, t('activerecord.attributes.provider.online') %>
    <%= f.select :online_is, [["online",true],["offline",false]], :include_blank => true %>
    </li>
    <li>
    <%= f.label :provider_group_id_equals, t('activerecord.attributes.provider.provider_group') %>
    <%= f.collection_select :provider_group_id_equals, ProviderGroup.all, :id, :name, :include_blank => true %>
    </li>
    <li>
    <br/>
    <%= f.submit t('buttons.search') %>
    <%= f.submit t('buttons.reset'),{ :type => "button", :class => "reset"}%>
    </li>
  </ul>
<% end %>
</div>

<div class="separador"></div>
  
<div class="main">
  <%= page_entries_info @providers %>
  <table cellspacing="0" cellpadding="0">
    <tbody>
      <tr class="odd">
        <th><%= t('activerecord.attributes.provider.name') + " (#{t('activerecord.attributes.provider.kind')})" %></th>
        <th><%=t 'activerecord.attributes.provider.interface' %></th>
        <th><%=t 'activerecord.attributes.provider.ip' %></th>
        <th><%=t 'activerecord.attributes.provider.rate_down' %> / <%=t 'activerecord.attributes.provider.rate_up' %></th>
        <th><%=t 'activerecord.attributes.provider.provider_group' %></th>
        <th><%=t 'activerecord.attributes.provider.state' %></th>
        <th><%=t 'activerecord.attributes.provider.online' %></th>
        <%= render :partial => "shared/plugins_table_headers" %>
        <% if current_user.may_update_providers? or current_user.may_index_providers? %>
        <th></th> 
        <% end %>
        <% if current_user.may_destroy_provider?(Provider.new) %>
        <th></th> 
        <% end %>
      </tr>
    
      <% @providers.each_with_index do |provider,i| %>
        <% css_class = i%2 == 0 ? "even" : "odd" %>
        <tr class="<%= css_class %>" >
          <td>
            <%=h "#{provider.name} (#{t('selects.provider.kind.' + provider.kind)})" %><br/>
            <%= link_to Graph.new(:element => provider).img("day", "small"), graph_path(provider ,:class => "Provider") %>
          </td>
          <td>
            <% if provider.interface %>
              <span title="link <%= provider.interface.status %>" <%= provider.interface.physical_link ? 'class="enable_color"' : 'class="disable_color"' %>><%=h provider.interface.name %></span><br/>
              <% if provider.kind == 'adsl' %>
                (<%= provider.link_interface %>)
              <% end %>
            <% end %>
          </td>
          <td>
            <%=h provider.ip %><br/>
            <%= provider.addresses.collect{ |a| a.ip}.join("<br/>") %>
          </td>
          <td><%=h provider.rate_down %>/<%=h provider.rate_up %></td>
          <td><%=h provider.provider_group.name rescue 'Undefined' %></td>
          <td><%=h t "aasm.provider.#{provider.state}" %></td>
          <td <%= provider.online ? 'class="enable_color"' : 'class="disable_color"' %>>
            <%=h provider.online ? "online" : "offline" %> <br/>
            <span class="status_time"> Hace <%=h provider.pretty_current_status_time -%> </span>
          </td>
          <%= render :partial => "shared/plugins_table_cells", :locals => {:object => provider} %>
          <% if current_user.may_update_provider?(provider) %>
{'fraction_non_alphanumeric': 0.20673257414591414, 'fraction_numerical': 0.0022525341008634713, 'mean_word_length': 2.8478574867597497, 'pattern_counts': {'":': 0, '<': 247, '<?xml version=': 0, '>': 272, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4103496', 'n_tokens_mistral': 2891, 'n_tokens_neox': 2617, 'n_words': 453}