diff options
Diffstat (limited to 'app/views/sherlock')
-rw-r--r-- | app/views/sherlock/file_samples/show.html.haml | 55 | ||||
-rw-r--r-- | app/views/sherlock/queries/_backtrace.html.haml | 31 | ||||
-rw-r--r-- | app/views/sherlock/queries/_general.html.haml | 54 | ||||
-rw-r--r-- | app/views/sherlock/queries/show.html.haml | 26 | ||||
-rw-r--r-- | app/views/sherlock/transactions/_file_samples.html.haml | 24 | ||||
-rw-r--r-- | app/views/sherlock/transactions/_general.html.haml | 38 | ||||
-rw-r--r-- | app/views/sherlock/transactions/_queries.html.haml | 24 | ||||
-rw-r--r-- | app/views/sherlock/transactions/index.html.haml | 41 | ||||
-rw-r--r-- | app/views/sherlock/transactions/show.html.haml | 36 |
9 files changed, 0 insertions, 329 deletions
diff --git a/app/views/sherlock/file_samples/show.html.haml b/app/views/sherlock/file_samples/show.html.haml deleted file mode 100644 index b7e6f883667..00000000000 --- a/app/views/sherlock/file_samples/show.html.haml +++ /dev/null @@ -1,55 +0,0 @@ -- page_title t('sherlock.title'), t('sherlock.transaction'), - t('sherlock.file_sample') - -- header_title t('sherlock.title'), sherlock_transactions_path - -.row-content-block - .float-right - = link_to(sherlock_transaction_path(@transaction), class: 'btn gl-button') do - = sprite_icon('arrow-left') - = t('sherlock.transaction') - .oneline - = t('sherlock.file_sample') - = @file_sample.id - -.gl-mt-3 - %p - %span.light - #{t('sherlock.time')}: - %strong - = @file_sample.duration.round(2) - = t('sherlock.milliseconds') - %p - %span.light - #{t('sherlock.events')}: - %strong - = @file_sample.events - -%article.file-holder - .js-file-title.file-title - = sprite_icon("doc-text") - %strong - = @file_sample.file - .code.file-content.js-syntax-highlight - .line-numbers - %table.sherlock-line-samples-table.gl-mb-0 - %thead - %tr - %th= t('sherlock.line_capitalized') - %th= t('sherlock.events') - %th= t('sherlock.time') - %th= t('sherlock.percent') - %tbody - - @file_sample.line_samples.each_with_index do |sample, index| - %tr{ class: sample.majority_of?(@file_sample.duration) ? 'slow' : '' } - %td= index + 1 - %td= sample.events - %td - = sample.duration.round(2) - = t('sherlock.milliseconds') - %td - = sample.percentage_of(@file_sample.duration).round - = t('sherlock.percent') - - .sherlock-file-sample - = highlight(@file_sample.file, @file_sample.source) diff --git a/app/views/sherlock/queries/_backtrace.html.haml b/app/views/sherlock/queries/_backtrace.html.haml deleted file mode 100644 index 425113ba325..00000000000 --- a/app/views/sherlock/queries/_backtrace.html.haml +++ /dev/null @@ -1,31 +0,0 @@ -.gl-mt-3 - .card - .card-header - %strong - = t('sherlock.application_backtrace') - %ul.content-list - - @query.application_backtrace.each do |location| - %li - %strong - - if defined?(BetterErrors) - = link_to(location.path, BetterErrors.editor.url(location.path, location.line)) - - else - = location.path - %small.light - = t('sherlock.line') - = location.line - - .card - .card-header - %strong - = t('sherlock.full_backtrace') - %ul.content-list - - @query.backtrace.each do |location| - %li - - if location.application? - %strong= location.path - - else - = location.path - %small.light - = t('sherlock.line') - = location.line diff --git a/app/views/sherlock/queries/_general.html.haml b/app/views/sherlock/queries/_general.html.haml deleted file mode 100644 index a16314213c4..00000000000 --- a/app/views/sherlock/queries/_general.html.haml +++ /dev/null @@ -1,54 +0,0 @@ -.gl-mt-3 - .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.url(frame.path, frame.line)) - - else - = frame.path - %small.light - = t('sherlock.line') - = frame.line - - .card - .card-header - .float-right - %button.js-clipboard-trigger.gl-button.btn.btn-default.btn-sm{ title: t('sherlock.copy_to_clipboard'), type: :button } - = sprite_icon('copy-to-clipboard') - %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.gl-button.btn.btn-default.btn-sm{ title: t('sherlock.copy_to_clipboard'), type: :button } - = sprite_icon('copy-to-clipboard') - %pre.hidden - = @query.explain - %strong - = t('sherlock.query_plan') - %ul.content-list - %li - .code.js-syntax-highlight.sherlock-code - %pre - %code= @query.explain diff --git a/app/views/sherlock/queries/show.html.haml b/app/views/sherlock/queries/show.html.haml deleted file mode 100644 index eea13d105d8..00000000000 --- a/app/views/sherlock/queries/show.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -- page_title t('sherlock.title'), t('sherlock.transaction'), t('sherlock.query') -- header_title t('sherlock.title'), sherlock_transactions_path - -%ul.nav-links.nav.nav-tabs - %li.active - %a{ href: "#tab-general", data: { toggle: "tab" } } - = t('sherlock.general') - %li - %a{ href: "#tab-backtrace", data: { toggle: "tab" } } - = t('sherlock.backtrace') - -.row-content-block - .float-right - = link_to(sherlock_transaction_path(@transaction), class: 'btn gl-button btn-default') do - = sprite_icon('arrow-left') - = t('sherlock.transaction') - .oneline - = t('sherlock.query') - = @query.id - -.tab-content - .tab-pane.active#tab-general - = render(partial: 'general') - - .tab-pane#tab-backtrace - = render(partial: 'backtrace') diff --git a/app/views/sherlock/transactions/_file_samples.html.haml b/app/views/sherlock/transactions/_file_samples.html.haml deleted file mode 100644 index 110eb42f9ea..00000000000 --- a/app/views/sherlock/transactions/_file_samples.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -- if @transaction.file_samples.empty? - .nothing-here-block - = t('sherlock.no_file_samples') -- else - .table-holder - %table.table - %thead - %tr - %th= t('sherlock.time_inclusive') - %th= t('sherlock.count') - %th= t('sherlock.path') - %th - %tbody - - @transaction.sorted_file_samples.each do |sample| - %tr - %td - = sample.duration.round(2) - = t('sherlock.milliseconds') - %td= @transaction.view_counts.fetch(sample.file, 1) - %td= sample.relative_path - %td - = link_to(t('sherlock.view'), - sherlock_transaction_file_sample_path(@transaction, sample), - class: 'gl-button btn btn-sm') diff --git a/app/views/sherlock/transactions/_general.html.haml b/app/views/sherlock/transactions/_general.html.haml deleted file mode 100644 index 7cf6f27e1af..00000000000 --- a/app/views/sherlock/transactions/_general.html.haml +++ /dev/null @@ -1,38 +0,0 @@ -.gl-mt-3 - .card - .card-header - %strong - = t('sherlock.general') - %ul.content-list - %li - %span.light - #{t('sherlock.id')}: - %strong - = @transaction.id - %li - %span.light - #{t('sherlock.type')}: - %strong - = @transaction.type - %li - %span.light - #{t('sherlock.path')}: - %strong - = @transaction.path - %li - %span.light - #{t('sherlock.time')}: - %strong - = @transaction.duration.round(2) - = t('sherlock.seconds') - %li - %span.light - #{t('sherlock.query_time')} - %strong - = @transaction.query_duration.round(2) - = t('sherlock.seconds') - %li - %span.light - #{t('sherlock.finished_at')}: - %strong - = time_ago_with_tooltip @transaction.finished_at diff --git a/app/views/sherlock/transactions/_queries.html.haml b/app/views/sherlock/transactions/_queries.html.haml deleted file mode 100644 index afe23d61bcd..00000000000 --- a/app/views/sherlock/transactions/_queries.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -- 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, language: 'sql') - %td - = link_to(t('sherlock.view'), - sherlock_transaction_query_path(@transaction, query), - class: 'gl-button btn btn-sm') diff --git a/app/views/sherlock/transactions/index.html.haml b/app/views/sherlock/transactions/index.html.haml deleted file mode 100644 index a2be6cae1e0..00000000000 --- a/app/views/sherlock/transactions/index.html.haml +++ /dev/null @@ -1,41 +0,0 @@ -- page_title t('sherlock.title') -- header_title t('sherlock.title'), sherlock_transactions_path - -.row-content-block - .float-right - = link_to(destroy_all_sherlock_transactions_path, - class: 'gl-button btn btn-danger', - method: :delete) do - = sprite_icon('remove') - = t('sherlock.delete_all_transactions') - .oneline= t('sherlock.introduction') - -- if @transactions.empty? - .nothing-here-block= t('sherlock.no_transactions') -- else - .table-holder - %table.table - %thead - %tr - %th= t('sherlock.type') - %th= t('sherlock.path') - %th= t('sherlock.time') - %th= t('sherlock.queries') - %th= t('sherlock.finished_at') - %th - %tbody - - @transactions.each do |trans| - %tr - %td= trans.type - %td - %span{ title: trans.path } - = truncate(trans.path, length: 70) - %td - = trans.duration.round(2) - = t('sherlock.seconds') - %td= trans.queries.length - %td - = time_ago_with_tooltip trans.finished_at - %td - = link_to(sherlock_transaction_path(trans), class: 'gl-button btn btn-sm') do - = t('sherlock.view') diff --git a/app/views/sherlock/transactions/show.html.haml b/app/views/sherlock/transactions/show.html.haml deleted file mode 100644 index 162b14f01e1..00000000000 --- a/app/views/sherlock/transactions/show.html.haml +++ /dev/null @@ -1,36 +0,0 @@ -- page_title t('sherlock.title'), t('sherlock.transaction') -- header_title t('sherlock.title'), sherlock_transactions_path - -%ul.nav-links.nav.nav-tabs - %li.active - %a{ href: "#tab-general", data: { toggle: "tab" } } - = t('sherlock.general') - %li - %a{ href: "#tab-queries", data: { toggle: "tab" } } - = t('sherlock.queries') - %span.badge.badge-pill - #{@transaction.queries.length} - %li - %a{ href: "#tab-file-samples", data: { toggle: "tab" } } - = t('sherlock.file_samples') - %span.badge.badge-pill - #{@transaction.file_samples.length} - -.row-content-block - .float-right - = link_to(sherlock_transactions_path, class: 'gl-button btn') do - = sprite_icon('arrow-left', css_class: 'gl-mr-3') - = t('sherlock.all_transactions') - .oneline - = t('sherlock.transaction') - = @transaction.id - -.tab-content - .tab-pane.active#tab-general - = render(partial: 'general') - - .tab-pane#tab-queries - = render(partial: 'queries') - - .tab-pane#tab-file-samples - = render(partial: 'file_samples') |