diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-07-23 12:30:00 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-07-23 12:30:00 +0300 |
commit | 3a4cb6d6759abbfd16e048413e8545d1d94e7d9e (patch) | |
tree | d6631643d70462ee38936708107bbedefbb5f45f /app | |
parent | 5e102f17f0ef16d0fd1eff98b9229fea2bc1fec9 (diff) |
Bring backward compatibility for request profiles
It seems that we missed the backward compatibility support
for profiles in the existing folder.
This commit also fixes some specs to be idempotent
and work in a temporary directory which not always
seems to be the case.
This commit also brings the profile_spec.rb which seems
to be missing.
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/requests_profiles_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/requests_profiles_controller.rb b/app/controllers/admin/requests_profiles_controller.rb index 1d14812186a..24383455064 100644 --- a/app/controllers/admin/requests_profiles_controller.rb +++ b/app/controllers/admin/requests_profiles_controller.rb @@ -3,12 +3,12 @@ class Admin::RequestsProfilesController < Admin::ApplicationController def index @profile_token = Gitlab::RequestProfiler.profile_token - @profiles = Gitlab::RequestProfiler::Profile.all.group_by(&:request_path) + @profiles = Gitlab::RequestProfiler.all.group_by(&:request_path) end def show clean_name = Rack::Utils.clean_path_info(params[:name]) - profile = Gitlab::RequestProfiler::Profile.find(clean_name) + profile = Gitlab::RequestProfiler.find(clean_name) unless profile && profile.content_type return redirect_to admin_requests_profiles_path, alert: 'Profile not found' |