diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2017-05-06 19:45:46 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2017-05-06 19:45:46 +0300 |
commit | c17e6a6c68b0412b3433632802b852db474a7b30 (patch) | |
tree | a7e6b1ec2e0e5f691aa6fd7585f5b63a15131114 /app/serializers/job_group_entity.rb | |
parent | 1186dcabbfb8e885351c1ef05d4583fd474732e9 (diff) |
Real time pipeline show action
Diffstat (limited to 'app/serializers/job_group_entity.rb')
-rw-r--r-- | app/serializers/job_group_entity.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/serializers/job_group_entity.rb b/app/serializers/job_group_entity.rb new file mode 100644 index 00000000000..a4d3737429c --- /dev/null +++ b/app/serializers/job_group_entity.rb @@ -0,0 +1,16 @@ +class JobGroupEntity < Grape::Entity + include RequestAwareEntity + + expose :name + expose :size + expose :detailed_status, as: :status, with: StatusEntity + expose :jobs, with: BuildEntity + + private + + alias_method :group, :object + + def detailed_status + group.detailed_status(request.user) + end +end |