summaryrefslogtreecommitdiff
path: root/app/serializers/stage_entity.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2017-05-06 16:45:46 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2017-05-06 16:45:46 +0000
commitc17e6a6c68b0412b3433632802b852db474a7b30 (patch)
treea7e6b1ec2e0e5f691aa6fd7585f5b63a15131114 /app/serializers/stage_entity.rb
parent1186dcabbfb8e885351c1ef05d4583fd474732e9 (diff)
downloadgitlab-ce-c17e6a6c68b0412b3433632802b852db474a7b30.tar.gz
Real time pipeline show action
Diffstat (limited to 'app/serializers/stage_entity.rb')
-rw-r--r--app/serializers/stage_entity.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/serializers/stage_entity.rb b/app/serializers/stage_entity.rb
index 7a047bdc712..97ced8730ed 100644
--- a/app/serializers/stage_entity.rb
+++ b/app/serializers/stage_entity.rb
@@ -7,9 +7,11 @@ class StageEntity < Grape::Entity
"#{stage.name}: #{detailed_status.label}"
end
- expose :detailed_status,
- as: :status,
- with: StatusEntity
+ expose :groups,
+ if: -> (_, opts) { opts[:grouped] },
+ with: JobGroupEntity
+
+ expose :detailed_status, as: :status, with: StatusEntity
expose :path do |stage|
namespace_project_pipeline_path(