summaryrefslogtreecommitdiff
path: root/app/serializers/analytics_stage_entity.rb
diff options
context:
space:
mode:
authorMałgorzata Ksionek <mksionek@gitlab.com>2019-07-04 16:42:31 +0200
committerMałgorzata Ksionek <mksionek@gitlab.com>2019-07-15 15:06:40 +0200
commitbeaa63530669d10c7244d187fa386144bc5da7eb (patch)
treebc541f200d5a5b2c37ff50e1a75ad1b848e6c396 /app/serializers/analytics_stage_entity.rb
parent0e8af2525f16d871510c24e6e15f1bc80f133edd (diff)
downloadgitlab-ce-beaa63530669d10c7244d187fa386144bc5da7eb.tar.gz
Add class for group level analytics
Add specs for group level Update entities Update base classes Add groups-centric changes Update plan and review stage Add summary classes Add summary spec Update specs files Add to specs test cases for group Add changelog entry Add group serializer Fix typo Fix typo Add fetching namespace in sql query Update specs Add rubocop fix Add rubocop fix Modify method to be in sync with code review Add counting deploys from subgroup To group summary stage Add subgroups handling In group stage summary Add additional spec Add additional specs Add more precise inheritance Add attr reader to group level Fix rubocop offence Fix problems with specs Add cr remarks Renaming median method and a lot of calls in specs Move spec setup Rename method in specs Add code review remarks regarding module Add proper module name
Diffstat (limited to 'app/serializers/analytics_stage_entity.rb')
-rw-r--r--app/serializers/analytics_stage_entity.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/analytics_stage_entity.rb b/app/serializers/analytics_stage_entity.rb
index 8bc6da5aeeb..eb38b90fb18 100644
--- a/app/serializers/analytics_stage_entity.rb
+++ b/app/serializers/analytics_stage_entity.rb
@@ -8,9 +8,9 @@ class AnalyticsStageEntity < Grape::Entity
expose :legend
expose :description
- expose :median, as: :value do |stage|
+ expose :project_median, as: :value do |stage|
# median returns a BatchLoader instance which we first have to unwrap by using to_f
# we use to_f to make sure results below 1 are presented to the end-user
- stage.median.to_f.nonzero? ? distance_of_time_in_words(stage.median) : nil
+ stage.project_median.to_f.nonzero? ? distance_of_time_in_words(stage.project_median) : nil
end
end