Sha256: 9d220738bacc49e420360ffd6bc0d31382ccc33a01d79691e98561e40baaaa87

Contents?: true

Size: 1.88 KB

Versions: 2

Compression:

Stored size: 1.88 KB

Contents

<turbo-frame id="slow_requests_widget">
  <h3 class="text-base font-semibold leading-6 text-gray-900">Slowest Requests</h3>
  <dl class="mt-3 rounded-lg">
    <ul role="list" class="divide-y divide-gray-100 overflow-hidden bg-white shadow-sm ring-1 ring-gray-900/5 rounded-lg">
      <% if @requests.empty? %>
      <li>
        <p class="p-5 text-center">No requests registered</p>
      </li>
      <% end %>

      <% @requests.each do |req| %>
      <li>
        <a href="<%= request_path(req) %>" target="_top" class="relative flex justify-between gap-x-6 px-4 py-5 hover:bg-gray-50 sm:px-6">
          <div class="flex min-w-0 gap-x-4">
            <div class="min-w-0 flex-auto">
              <p class="text-sm leading-6 text-gray-900">
                <%= render RailsLiveDashboard::RequestMethodBadgeComponent.new(req.method) %>
              </p>
              <p class="mt-2 flex text-sm leading-6 text-gray-900">
                <%= req.content.path %>
              </p>
            </div>
          </div>
          <div class="flex shrink-0 items-center gap-x-4">
            <div class="hidden sm:flex sm:flex-col sm:items-end">
              <p class="text-sm leading-6 text-gray-900">
                <%= render RailsLiveDashboard::RequestDurationBadgeComponent.new(req.content.duration) %>
              </p>
              <p class="mt-1 text-xs leading-5 text-gray-500">
                <%= req.created_at.strftime("%Y-%m-%d %H:%M:%S") %>
              </p>
            </div>
            <svg class="h-5 w-5 flex-none text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
              <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
            </svg>
          </div>
        </a>
      </li>
      <%end %>
    </ul>
  </dl>
</turbo-frame>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_live_dashboard-0.1.1 app/views/rails_live_dashboard/widgets/slowest_requests/show.html.erb
rails_live_dashboard-0.1.0 app/views/rails_live_dashboard/widgets/slowest_requests/show.html.erb