Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-05-21 12:39:46 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-05-21 16:13:32 +0300
commit631bd9bf082c396059867d512fcfbdc80445c65e (patch)
tree65f5c54174b5cf75d9bf0dd660ca4ac7a9585c1b /app/controllers/projects/pipelines_controller.rb
parentb113330fab21d3da547cbee057b825f2225676c6 (diff)
Use persisted stages to load pipelines index table
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r--app/controllers/projects/pipelines_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index 6b40fc2fe68..886431df7f7 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -1,5 +1,5 @@
class Projects::PipelinesController < Projects::ApplicationController
- before_action :whitelist_query_limiting, only: [:create, :retry]
+ # before_action :whitelist_query_limiting, only: [:create, :retry]
before_action :pipeline, except: [:index, :new, :create, :charts]
before_action :commit, only: [:show, :builds, :failures]
before_action :authorize_read_pipeline!
@@ -15,6 +15,7 @@ class Projects::PipelinesController < Projects::ApplicationController
@pipelines = PipelinesFinder
.new(project, scope: @scope)
.execute
+ .preload(:stages)
.page(params[:page])
.per(30)
@@ -23,7 +24,7 @@ class Projects::PipelinesController < Projects::ApplicationController
@finished_count = limited_pipelines_count(project, 'finished')
@pipelines_count = limited_pipelines_count(project)
- Gitlab::Ci::Pipeline::Preloader.preload(@pipelines)
+ Gitlab::Ci::Pipeline::Preloader.preload(@project, @pipelines)
respond_to do |format|
format.html