diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-07-15 18:46:39 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-07-26 21:06:09 +0300 |
commit | 345cd22f21e4e5a6e340c35e50b43105ee107570 (patch) | |
tree | d1f3916535c9bca94cb9c8fe16559332dcbf762e /app/views/admin | |
parent | 0c799be6b6fc0166473c82039ebf662a0558ed8f (diff) |
Profile requests when a header is passed
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/background_jobs/_head.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/requests_profiles/index.html.haml | 26 |
2 files changed, 30 insertions, 0 deletions
diff --git a/app/views/admin/background_jobs/_head.html.haml b/app/views/admin/background_jobs/_head.html.haml index 9d722bd7382..89d7a40d6b0 100644 --- a/app/views/admin/background_jobs/_head.html.haml +++ b/app/views/admin/background_jobs/_head.html.haml @@ -16,3 +16,7 @@ = link_to admin_health_check_path, title: 'Health Check' do %span Health Check + = nav_link(controller: :requests_profiles) do + = link_to admin_requests_profiles_path, title: 'Requests Profiles' do + %span + Requests Profiles diff --git a/app/views/admin/requests_profiles/index.html.haml b/app/views/admin/requests_profiles/index.html.haml new file mode 100644 index 00000000000..ae918086a57 --- /dev/null +++ b/app/views/admin/requests_profiles/index.html.haml @@ -0,0 +1,26 @@ +- @no_container = true +- page_title 'Requests Profiles' += render 'admin/background_jobs/head' + +%div{ class: container_class } + %h3.page-title + = page_title + + .bs-callout.clearfix + Pass the header + %code X-Profile-Token: #{@profile_token} + to profile the request + + - if @profiles.present? + .prepend-top-default + - @profiles.each do |path, profiles| + .panel.panel-default.panel-small + .panel-heading + %code= path + %ul.content-list + - profiles.each do |profile| + %li + = link_to profile.time.to_s(:long), admin_requests_profile_path(profile), data: {no_turbolink: true} + - else + %p + No profiles found |