diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-02-15 14:06:00 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-02-16 22:25:01 +0000 |
commit | 0f36cfd7f58977becea9d3ecf410d3669440fbe9 (patch) | |
tree | 823283da83e245917a56208dfbe28111b2879a9a /app/controllers/projects/pipelines_controller.rb | |
parent | b632bdddee8a0801c61186e2dbe8188304df40ef (diff) | |
download | gitlab-ce-0f36cfd7f58977becea9d3ecf410d3669440fbe9.tar.gz |
Adds Pending and Finished tabs to pipelines page
Fix broken test
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 84451257b98..8657bc4dfdc 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -13,9 +13,15 @@ class Projects::PipelinesController < Projects::ApplicationController .page(params[:page]) .per(30) - @running_or_pending_count = PipelinesFinder + @running_count = PipelinesFinder .new(project).execute(scope: 'running').count + @pending_count = PipelinesFinder + .new(project).execute(scope: 'pending').count + + @finished_count = PipelinesFinder + .new(project).execute(scope: 'finished').count + @pipelines_count = PipelinesFinder .new(project).execute.count @@ -29,7 +35,9 @@ class Projects::PipelinesController < Projects::ApplicationController .represent(@pipelines), count: { all: @pipelines_count, - running_or_pending: @running_or_pending_count + running: @running_count, + pending: @pending_count, + finished: @finished_count, } } end |