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:
Diffstat (limited to 'app/serializers/analytics/cycle_analytics/stage_entity.rb')
-rw-r--r--app/serializers/analytics/cycle_analytics/stage_entity.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/serializers/analytics/cycle_analytics/stage_entity.rb b/app/serializers/analytics/cycle_analytics/stage_entity.rb
index b24148802d0..c5cc8c89fb7 100644
--- a/app/serializers/analytics/cycle_analytics/stage_entity.rb
+++ b/app/serializers/analytics/cycle_analytics/stage_entity.rb
@@ -9,6 +9,21 @@ module Analytics
expose :description
expose :id
expose :custom
+
+ # new API
+ expose :start_event do
+ expose :start_event_identifier, as: :identifier, if: -> (s) { s.custom? }
+ expose :start_event_label, as: :label, using: LabelEntity, if: -> (s) { s.start_event_label_based? }
+ expose :start_event_html_description, as: :html_description
+ end
+
+ expose :end_event do
+ expose :end_event_identifier, as: :identifier, if: -> (s) { s.custom? }
+ expose :end_event_label, as: :label, using: LabelEntity, if: -> (s) { s.end_event_label_based? }
+ expose :end_event_html_description, as: :html_description
+ end
+
+ # old API
expose :start_event_identifier, if: -> (s) { s.custom? }
expose :end_event_identifier, if: -> (s) { s.custom? }
expose :start_event_label, using: LabelEntity, if: -> (s) { s.start_event_label_based? }