BigW Consortium Gitlab

_general.html.haml 1.48 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
.prepend-top-default
  .panel.panel-default
    .panel-heading
      %strong
        = t('sherlock.general')
    %ul.well-list
      %li
        %span.light
          #{t('sherlock.time')}:
        %strong
          = @query.duration.round(4)
          = t('sherlock.milliseconds')
      %li
14
        - frame = @query.last_application_frame
15 16 17
        %span.light
          #{t('sherlock.origin')}:
        %strong
18 19 20 21
          - if defined?(BetterErrors)
            = link_to(frame.path, BetterErrors.editor[frame.path, frame.line])
          - else
            = frame.path
22 23
        %small.light
          = t('sherlock.line')
24
          = frame.line
25 26 27 28

  .panel.panel-default
    .panel-heading
      .pull-right
29
        %button.js-clipboard-trigger.btn.btn-xs{ title: t('sherlock.copy_to_clipboard'), type: :button }
30 31 32 33 34 35 36 37 38 39 40 41 42 43
          %i.fa.fa-clipboard
        %pre.hidden
          = @query.formatted_query
      %strong
        = t('sherlock.query')
    %ul.well-list
      %li
        .code.js-syntax-highlight.sherlock-code
          :preserve
            #{highlight("#{@query.id}.sql", @query.formatted_query)}

  .panel.panel-default
    .panel-heading
      .pull-right
44
        %button.js-clipboard-trigger.btn.btn-xs{ title: t('sherlock.copy_to_clipboard'), type: :button }
45 46 47 48 49 50 51 52 53 54
          %i.fa.fa-clipboard
        %pre.hidden
          = @query.explain
      %strong
        = t('sherlock.query_plan')
    %ul.well-list
      %li
        .code.js-syntax-highlight.sherlock-code
          %pre
            %code= @query.explain