diff --git a/app/controllers/projects/builds/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb similarity index 89% rename from app/controllers/projects/builds/artifacts_controller.rb rename to app/controllers/projects/artifacts_controller.rb index bb70d801d8..ff04e14488 100644 --- a/app/controllers/projects/builds/artifacts_controller.rb +++ b/app/controllers/projects/artifacts_controller.rb @@ -1,4 +1,4 @@ -class Projects::Builds::ArtifactsController < Projects::ApplicationController +class Projects::ArtifactsController < Projects::ApplicationController layout 'project' before_action :authorize_download_build_artifacts! @@ -14,7 +14,7 @@ class Projects::Builds::ArtifactsController < Projects::ApplicationController send_file artifacts_file.path, disposition: 'attachment' end - def view + def browse @metadata = build.artifacts_metadata end diff --git a/app/views/projects/builds/artifacts/view.html.haml b/app/views/projects/artifacts/browse.html.haml similarity index 100% rename from app/views/projects/builds/artifacts/view.html.haml rename to app/views/projects/artifacts/browse.html.haml diff --git a/config/routes.rb b/config/routes.rb index bf9ee416ac..d5b5cb2d5e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -608,13 +608,9 @@ Rails.application.routes.draw do post :retry end - scope module: :builds do - resource :artifacts, only: [] do - collection do - get :download - get 'view(/:path)', as: :view, to: 'artifacts#view' - end - end + resource :artifacts, only: [] do + get :download + get 'browse(/*path)', action: :browse, as: :browse end end