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:
authorFilipa Lacerda <filipa@gitlab.com>2017-07-14 18:52:54 +0300
committerPhil Hughes <me@iamphill.com>2017-07-14 18:52:54 +0300
commit706d99aed8985d0a278107295f5f1d26f0b42383 (patch)
tree251eddb4221ee6e7ac0bd960b109981d5c5975f1 /app/controllers/projects/commit_controller.rb
parent0618ad12e2b50dd01ec1c5ce440345cb64e26133 (diff)
Update Pipeline's badge count in Merge Request and Commits view to match real-time content
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 14a1e11a6ea..6de125e7e80 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -38,9 +38,14 @@ class Projects::CommitController < Projects::ApplicationController
format.json do
Gitlab::PollingInterval.set_header(response, interval: 10_000)
- render json: PipelineSerializer
- .new(project: @project, current_user: @current_user)
- .represent(@pipelines)
+ render json: {
+ pipelines: PipelineSerializer
+ .new(project: @project, current_user: @current_user)
+ .represent(@pipelines),
+ count: {
+ all: @pipelines.count
+ }
+ }
end
end
end