Welcome to mirror list, hosted at ThFree Co, Russian Federation.

requests_profiles_controller.rb « admin « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a478176e138860b7d14e7b6b7aeae02304ac0dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Admin::RequestsProfilesController < Admin::ApplicationController
  def index
    @profile_token = Gitlab::RequestProfiler.profile_token
    @profiles      = Gitlab::RequestProfiler::Profile.all.group_by(&:request_path)
  end

  def show
    clean_name = Rack::Utils.clean_path_info(params[:name])
    profile    = Gitlab::RequestProfiler::Profile.find(clean_name)

    if profile
      render text: profile.content
    else
      redirect_to admin_requests_profiles_path, alert: 'Profile not found'
    end
  end
end