summaryrefslogtreecommitdiff
path: root/app/controllers/projects/artifacts_controller.rb
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2019-09-12 12:16:04 +0200
committerMatija Čupić <matteeyah@gmail.com>2019-09-12 12:16:04 +0200
commit946afebd6602bee772eef5fc9447fb59a7bbd2e1 (patch)
tree43243ccda31c2bd13c148429c39b5c3e49e2790e /app/controllers/projects/artifacts_controller.rb
parent54a3ec47e2ef169c998304a4a67d6bc6e66657fb (diff)
downloadgitlab-ce-mc/feature/artifacts-page-backend.tar.gz
Calculate artifact size properlymc/feature/artifacts-page-backend
Diffstat (limited to 'app/controllers/projects/artifacts_controller.rb')
-rw-r--r--app/controllers/projects/artifacts_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index 7424b521cba..54bc3b5c125 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -17,8 +17,10 @@ class Projects::ArtifactsController < Projects::ApplicationController
def index
finder = ArtifactsFinder.new(@project, artifacts_params)
- @artifacts = finder.execute.page(params[:page]).per(MAX_PER_PAGE)
- @total_size = @artifacts.total_size
+ all_artifacts = finder.execute
+
+ @artifacts = all_artifacts.page(params[:page]).per(MAX_PER_PAGE)
+ @total_size = all_artifacts.total_size
end
def destroy