<commit_before><p>Install and activate sources.</p>

<% if @groups.size > 0 %>
  <table class="table">
    <thead>
      <tr>
        <th class="group">Group</th>
        <th class="name">Source</th>
        <th>Status</th>
        <% if can?(:manage, Alert) %>
          <th class="status">Actions</th>
        <% end %>
      </tr>
    </thead>
    <tbody>
      <% @groups.with_sources.each do |group| %>
        <tr>
          <% if group.sources.first.name == source.name %>
            <td <%= "rowspan=#{group.sources.count}" %>><h4><%= h(group.display_name) %></h4></td>
          <% end %>
          <td><%= link_to_if source.installed?, source.display_name, source_path(source) %></td>
          <td><%= state_label(source.human_state_name).html_safe %></td>
          <% if can?(:manage, Alert) %>
            <td>
              <% if source.human_state_name == "available" %>
                <%= link_to 'Install', source_path(source, state_event: "install"), :method => :put, :data => { :confirm => 'Are you sure?' }, :remote => true, :class => 'btn btn-primary btn-sm', :id => "#{source.name}-status", :title => "Install Source" %>
              <% elsif source.human_state_name == "retired" %>
              <% elsif source.human_state_name == "inactive" %>
                <%= link_to 'Activate', source_path(source, state_event: "activate"), :method => :put, :remote => true, :class => 'btn btn-info btn-sm', :id => "#{source.name}-status", :title => "Activate Source" %>
              <% else %>
                <%= link_to 'Inactivate', source_path(source, state_event: "inactivate"), :method => :put, :remote => true, :class => 'btn btn-default btn-sm', :id => "#{source.name}-status", :title => "Inactivate Source" %>
              <% end %>
            </td>
          <% end %>
        </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
  <div class="alert alert-info">There are currently no groups</div>
<% end %><commit_msg>fixed syntax error<commit_after><p>Install and activate sources.</p>

<% if @groups.size > 0 %>
  <table class="table">
    <thead>
      <tr>
        <th class="group">Group</th>
        <th class="name">Source</th>
        <th>Status</th>
        <% if can?(:manage, Alert) %>
          <th class="status">Actions</th>
        <% end %>
      </tr>
    </thead>
    <tbody>
      <% @groups.with_sources.each do |group| %>
        <% group.sources.visible.each do |source| %>
          <tr>
            <% if group.sources.first.name == source.name %>
              <td <%= "rowspan=#{group.sources.count}" %>><h4><%= h(group.display_name) %></h4></td>
            <% end %>
            <td><%= link_to_if source.installed?, source.display_name, source_path(source) %></td>
            <td><%= state_label(source.human_state_name).html_safe %></td>
            <% if can?(:manage, Alert) %>
              <td>
                <% if source.human_state_name == "available" %>
                  <%= link_to 'Install', source_path(source, state_event: "install"), :method => :put, :data => { :confirm => 'Are you sure?' }, :remote => true, :class => 'btn btn-primary btn-sm', :id => "#{source.name}-status", :title => "Install Source" %>
                <% elsif source.human_state_name == "retired" %>
                <% elsif source.human_state_name == "inactive" %>
                  <%= link_to 'Activate', source_path(source, state_event: "activate"), :method => :put, :remote => true, :class => 'btn btn-info btn-sm', :id => "#{source.name}-status", :title => "Activate Source" %>
                <% else %>
                  <%= link_to 'Inactivate', source_path(source, state_event: "inactivate"), :method => :put, :remote => true, :class => 'btn btn-default btn-sm', :id => "#{source.name}-status", :title => "Inactivate Source" %>
                <% end %>
              </td>
            <% end %>
          </tr>
        <% end %>
      <% end %>
    </tbody>
  </table>
<% else %>
  <div class="alert alert-info">There are currently no groups</div>
<% end %>
{'fraction_non_alphanumeric': 0.20253479125248508, 'fraction_numerical': 0.0014910536779324055, 'mean_word_length': 2.320957095709571, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 0, '>': 151, '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': '244944', 'n_tokens_mistral': 1355, 'n_tokens_neox': 1240, 'n_words': 278}