summaryrefslogtreecommitdiff
path: root/app/helpers/blob_helper.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-05-04 15:01:54 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-05-04 15:01:54 +0000
commitd3768dd79698ae17cd0c82b7c78a8ead11b7e157 (patch)
tree5c98075e5a54fe3cb5f542487750a5fe3e9f40f3 /app/helpers/blob_helper.rb
parenta07d03e7c777ed9e169576e8bb92edc4b5557a79 (diff)
parent0f58eb6bde35009b69ef871534d9ff80fc38bbf7 (diff)
downloadgitlab-ce-d3768dd79698ae17cd0c82b7c78a8ead11b7e157.tar.gz
Merge branch 'dm-artifact-blob-viewer' into 'master'
Use blob viewer for job artifacts Closes #31297 See merge request !11018
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 37b6f4ad5cc..af430270ae4 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -119,7 +119,9 @@ module BlobHelper
end
def blob_raw_url
- if @snippet
+ if @build && @entry
+ raw_namespace_project_build_artifacts_path(@project.namespace, @project, @build, path: @entry.path)
+ elsif @snippet
if @snippet.project_id
raw_namespace_project_snippet_path(@project.namespace, @project, @snippet)
else
@@ -250,6 +252,8 @@ module BlobHelper
case viewer.blob.external_storage
when :lfs
'it is stored in LFS'
+ when :build_artifact
+ 'it is stored as a job artifact'
else
'it is stored externally'
end