<commit_before><div class='table-responsive'>
  <table class='table table-striped logs'>
    <tr>
      <th>Message</th>
      <th>When</th>
      <th width="200px"></th>
    </tr>

    <% @logs.each do |log| %>
      <tr>
        <td><%= truncate log.message, :length => 200, :omission => "..." %></td>
        <td><%= time_ago_in_words log.created_at %> ago</td>

        <td>
          <div class="btn-group btn-group-xs">
            <% if log.inbound_event_id.present? %>
              <%= link_to 'Event In', event_path(log.inbound_event), class: "btn btn-default" %>
            <% else %>
              <%= link_to 'Event In', '#', class: "btn btn-default disabled" %>
            <% end %>

            <% if log.outbound_event_id.present? %>
              <%= link_to 'Event Out', event_path(log.outbound_event), class: "btn btn-default" %>
            <% else %>
              <%= link_to 'Event Out', '#', class: "btn btn-default disabled" %>
            <% end %>

            <%= link_to 'Details', '#', :class => "btn btn-default show-log-details", :data => { :'modal-title' => log.level >= 4 ? 'Error' : 'Info', :'modal-content' => log.message } %>
          </div>
        </td>
      </tr>
    <% end %>
  </table>
</div><commit_msg>Handle removed events when rendering logs (#1634)<commit_after><div class='table-responsive'>
  <table class='table table-striped logs'>
    <tr>
      <th>Message</th>
      <th>When</th>
      <th width="200px"></th>
    </tr>

    <% @logs.each do |log| %>
      <tr>
        <td><%= truncate log.message, :length => 200, :omission => "..." %></td>
        <td><%= time_ago_in_words log.created_at %> ago</td>

        <td>
          <div class="btn-group btn-group-xs">
            <% if log.inbound_event.present? %>
              <%= link_to 'Event In', event_path(log.inbound_event), class: "btn btn-default" %>
            <% else %>
              <%= link_to 'Event In', '#', class: "btn btn-default disabled" %>
            <% end %>

            <% if log.outbound_event.present? %>
              <%= link_to 'Event Out', event_path(log.outbound_event), class: "btn btn-default" %>
            <% else %>
              <%= link_to 'Event Out', '#', class: "btn btn-default disabled" %>
            <% end %>

            <%= link_to 'Details', '#', :class => "btn btn-default show-log-details", :data => { :'modal-title' => log.level >= 4 ? 'Error' : 'Info', :'modal-content' => log.message } %>
          </div>
        </td>
      </tr>
    <% end %>
  </table>
</div>
{'fraction_non_alphanumeric': 0.20260663507109006, 'fraction_numerical': 0.0071090047393364926, 'mean_word_length': 2.0408163265306123, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 91, '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': '2858892', 'n_tokens_mistral': 898, 'n_tokens_neox': 813, 'n_words': 179}