<div class="d-flex align-items-center gap-2">
  <%= link_to Rails.application.routes.url_helpers.log_entry_path(log_entry),
              class: "badge bg-primary",
              target: "_blank" do %>
    <i class="fa-regular fa-file-lines me-1"></i>HttpLogEntry
    #<%= log_entry.id %>
  <% end %>

  <div class="d-flex align-items-center ms-auto gap-2">
    <%= link_to log_entry.uri.to_s,
                class: "badge bg-secondary text-truncate-link",
                target: "_blank",
                rel: "noopener noreferrer nofollow" do %>
      <i class="fa-solid fa-link me-1"></i>
      <%= log_entry.uri %>
    <% end %>
    <span
      class="badge <%= log_entry.status_code.to_i < 400 ? "bg-success" : "bg-danger" %>"
    >
      <i class="fa-solid fa-signal me-1"></i><%= log_entry.status_code %>
    </span>
    <span
      class="badge bg-light text-dark"
      title="<%= time_ago_in_words(log_entry.created_at) %> ago"
    >
      <i class="fa-regular fa-clock me-1"></i
      ><%= log_entry.created_at.strftime("%Y-%m-%d %H:%M:%S") %>
    </span>
  </div>
</div>
