39ae9a59a5
This replaces the repository param. This allows more flexiblity as sometimes we have highlight content not related to repository. Sometimes we know ahead of time the language of the content. Lastly language determination seems better fit as a logic in the Blob class. `repository` param is only used to determine the language, which seems to be the responsiblity of Blob.
54 lines
1.5 KiB
Text
54 lines
1.5 KiB
Text
.prepend-top-default
|
|
.card
|
|
.card-header
|
|
%strong
|
|
= t('sherlock.general')
|
|
%ul.content-list
|
|
%li
|
|
%span.light
|
|
#{t('sherlock.time')}:
|
|
%strong
|
|
= @query.duration.round(4)
|
|
= t('sherlock.milliseconds')
|
|
%li
|
|
- frame = @query.last_application_frame
|
|
%span.light
|
|
#{t('sherlock.origin')}:
|
|
%strong
|
|
- if defined?(BetterErrors)
|
|
= link_to(frame.path, BetterErrors.editor[frame.path, frame.line])
|
|
- else
|
|
= frame.path
|
|
%small.light
|
|
= t('sherlock.line')
|
|
= frame.line
|
|
|
|
.card
|
|
.card-header
|
|
.float-right
|
|
%button.js-clipboard-trigger.btn.btn-sm{ title: t('sherlock.copy_to_clipboard'), type: :button }
|
|
= sprite_icon('duplicate')
|
|
%pre.hidden
|
|
= @query.formatted_query
|
|
%strong
|
|
= t('sherlock.query')
|
|
%ul.content-list
|
|
%li
|
|
.code.js-syntax-highlight.sherlock-code
|
|
:preserve
|
|
#{highlight("#{@query.id}.sql", @query.formatted_query, language: 'sql')}
|
|
|
|
.card
|
|
.card-header
|
|
.float-right
|
|
%button.js-clipboard-trigger.btn.btn-sm{ title: t('sherlock.copy_to_clipboard'), type: :button }
|
|
= sprite_icon('duplicate')
|
|
%pre.hidden
|
|
= @query.explain
|
|
%strong
|
|
= t('sherlock.query_plan')
|
|
%ul.content-list
|
|
%li
|
|
.code.js-syntax-highlight.sherlock-code
|
|
%pre
|
|
%code= @query.explain
|