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>2016-12-15 17:57:35 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-15 17:57:35 +0300
commitccea4727a6999d6abaea9e7a43bd1e015e43f1d2 (patch)
tree642dc24083c93ea1fa4eef89e20a108c8429167c /app/serializers
parentc7db5b3efa2e02c580bf60be78780103847e4ba4 (diff)
Fix pipeline detailed status serializer and entities
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/pipeline_entity.rb9
-rw-r--r--app/serializers/status_entity.rb2
2 files changed, 8 insertions, 3 deletions
diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb
index e071c03e20b..613a18e6357 100644
--- a/app/serializers/pipeline_entity.rb
+++ b/app/serializers/pipeline_entity.rb
@@ -4,7 +4,7 @@ class PipelineEntity < Grape::Entity
expose :id
expose :user, using: UserEntity
- expose :url do |pipeline|
+ expose :path do |pipeline|
namespace_project_pipeline_path(
pipeline.project.namespace,
pipeline.project,
@@ -12,7 +12,12 @@ class PipelineEntity < Grape::Entity
end
expose :details do
- expose :detailed_status, as: :status, using: StatusEntity
+ expose :status do |pipeline, options|
+ StatusEntity.represent(
+ pipeline.detailed_status(request.user),
+ options)
+ end
+
expose :duration
expose :finished_at
expose :stages, using: PipelineStageEntity
diff --git a/app/serializers/status_entity.rb b/app/serializers/status_entity.rb
index ae14dd57f61..261faa67527 100644
--- a/app/serializers/status_entity.rb
+++ b/app/serializers/status_entity.rb
@@ -1,7 +1,7 @@
class StatusEntity < Grape::Entity
include RequestAwareEntity
- expose :icon, :text, :label, :title
+ expose :icon, :text, :label
expose :has_details?, as: :has_details
expose :details_path