summaryrefslogtreecommitdiff
path: root/app/views/sherlock/transactions/_queries.html.haml
blob: c1ec4b91bb62ece4f29732b296986eaac5c10165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
- if @transaction.queries.empty?
  .nothing-here-block
    = t('sherlock.no_queries')
- else
  .table-holder
    %table.table#sherlock-queries
      %thead
        %tr
          %th= t('sherlock.time')
          %th= t('sherlock.query')
          %th
      %tbody
        - @transaction.sorted_queries.each do |query|
          %tr
            %td
              = query.duration.round(2)
              = t('sherlock.milliseconds')
            %td
              .code.js-syntax-highlight.sherlock-code
                = highlight("#{query.id}.sql", query.formatted_query)
            %td
              = link_to(t('sherlock.view'),
                sherlock_transaction_query_path(@transaction, query),
                class: 'btn btn-sm')