diff options
author | Robert Speicher <robert@gitlab.com> | 2016-01-21 23:23:02 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-01-21 23:23:02 +0000 |
commit | 3f5e6c6cf65640d01ac5c784b7ba47c74531519e (patch) | |
tree | d7cd239ee6669386106773401fedaecfeed2092c /app | |
parent | 307b099064c598208ff25c8dbf5250d9561e62f3 (diff) | |
parent | 9b0f57781e8c71eb0e627a63078fedcedfe62bbb (diff) | |
download | gitlab-ce-3f5e6c6cf65640d01ac5c784b7ba47c74531519e.tar.gz |
Merge branch 'ci/recursive-artifacts-entries' into 'master'
Add method to calculate total size of artifacts in subpath
See merge request !2500
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/build.rb | 8 | ||||
-rw-r--r-- | app/views/projects/builds/show.html.haml | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 16a5b03f591..623edd8bc57 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -346,17 +346,17 @@ module Ci end def artifacts_browse_url - if artifacts_browser_supported? + if artifacts_metadata? browse_namespace_project_build_artifacts_path(project.namespace, project, self) end end - def artifacts_browser_supported? + def artifacts_metadata? artifacts? && artifacts_metadata.exists? end - def artifacts_metadata_entry(path) - Gitlab::Ci::Build::Artifacts::Metadata.new(artifacts_metadata.path, path).to_entry + def artifacts_metadata_entry(path, **options) + Gitlab::Ci::Build::Artifacts::Metadata.new(artifacts_metadata.path, path, **options).to_entry end private diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 2be572d3b10..ba1fdc6f0e7 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -96,7 +96,7 @@ .center .btn-group{ role: :group } = link_to "Download", @build.artifacts_download_url, class: 'btn btn-sm btn-primary' - - if @build.artifacts_browser_supported? + - if @build.artifacts_metadata? = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary' .build-widget |