summaryrefslogtreecommitdiff
path: root/app/views/sherlock/transactions/_file_samples.html.haml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-11-17 14:33:35 +0100
committerDouwe Maan <douwe@gitlab.com>2015-11-17 14:33:35 +0100
commit7b014338ca94caf4677a035f28469945e6a80100 (patch)
treec442bdae95edb35d14551ca04052227bdb840511 /app/views/sherlock/transactions/_file_samples.html.haml
parentbb8b6f38e7fef0afd41088d54d9dda41695ec1c7 (diff)
parent1c040b3f0a3ecb18fc8fdea3cf99b70edad8d873 (diff)
downloadgitlab-ce-contributor-graph-by-email.tar.gz
Merge branch 'master' into contributor-graph-by-emailcontributor-graph-by-email
Diffstat (limited to 'app/views/sherlock/transactions/_file_samples.html.haml')
-rw-r--r--app/views/sherlock/transactions/_file_samples.html.haml24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/views/sherlock/transactions/_file_samples.html.haml b/app/views/sherlock/transactions/_file_samples.html.haml
new file mode 100644
index 00000000000..4349c9b7ace
--- /dev/null
+++ b/app/views/sherlock/transactions/_file_samples.html.haml
@@ -0,0 +1,24 @@
+- 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: 'btn btn-xs')