#results_list
  - if log_requests.empty? && params[:search].blank?
    = render partial: 'no_log_requests'
  - else
    table.data
      thead
        tr
          th = sortable('log.code', 'Response Code')
          th = sortable('timestamp', 'Time')
          - unless same_applications
            th Developer account
            th = sortable('application_id', 'Application')
          th

        tr class="search"
          = search_form do |s|
            th
              = s.text_field :code, size:  10, class: :query
            th colspan="#{same_applications ? 1 : 3}"
            th
              = s.submit 'Search', name: nil

      tbody.log-requests
        - log_requests.each do |log|
          tr
            td = link_to "#", class: "show-trace-lr #{request_log_response_code_class(log.code)}" do
              = log.code
              span.elipsis …
            td= log.timestamp
            - unless same_applications
              td
                - if log.app && log.app.account
                  = link_to log.app.account.name, admin_buyers_account_path(log.app.account)
                - else
                  = "(missing)"
              td
                - if log.app
                  = link_to log.app.name, admin_buyers_application_path(log.app)
                - else
                  = "(missing)"
            td

          tr class="trace-detail" style="display: none;"
            td colspan=6
              dl
                dt Reported usage by metric:
                dd class="usage" = format_request_log_usage(log.usage)
                dt Request:
                dd
                  pre class="traces request"
                    = log.request
                dt Response:
                dd
                  pre class="traces #{request_log_response_code_class(log.code)}"
                    = log.response
            td
        - if log_requests.empty?
          tr class="no_results"
            td colspan=6
              ' No results. You can reset the search form by clicking on
              = button_to 'Reset', '', value: '', method: :get

    = will_paginate log_requests unless log_requests.empty?
