diff options
| author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2015-12-21 12:53:31 +0100 |
|---|---|---|
| committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-01-14 12:48:13 +0100 |
| commit | 5a1faf61f6d8bdbdde1842db8cf13521287ed168 (patch) | |
| tree | f77442f8469a924ec332506f98292c89da96e47b /app/controllers/projects | |
| parent | 37b2c5dd5521f25a7195e82538a0ffc528c3ec6d (diff) | |
| download | gitlab-ce-5a1faf61f6d8bdbdde1842db8cf13521287ed168.tar.gz | |
Add artifacts browser
This implementation makes it possible to browse artifacts, it
depends on artifacts metadata.
Diffstat (limited to 'app/controllers/projects')
| -rw-r--r-- | app/controllers/projects/artifacts_controller.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb index c1f406e3ba5..4524127e8e5 100644 --- a/app/controllers/projects/artifacts_controller.rb +++ b/app/controllers/projects/artifacts_controller.rb @@ -15,10 +15,8 @@ class Projects::ArtifactsController < Projects::ApplicationController end def browse - path = params[:path].to_s - @paths = artifacts_metadata.map do |_artifact_file| - Gitlab::StringPath.new(path, artifacts_metadata) - end + current_path = params[:path] ? "./#{params[:path]}/" : './' + @path = Gitlab::StringPath.new(current_path, artifacts_metadata) end private |
