diff options
author | João Cunha <j.a.cunha@gmail.com> | 2019-02-26 10:33:32 +0000 |
---|---|---|
committer | João Cunha <j.a.cunha@gmail.com> | 2019-02-26 10:33:32 +0000 |
commit | ed7065bbdb6f6fad3cc8fb369267fa811767c8a5 (patch) | |
tree | b3fda377c51504a6d21da1742cac3de7fd668ef0 /lib/gitlab/usage_data.rb | |
parent | 26c7d04cd06d1126e4a4a7a1c9308d12de77172e (diff) | |
parent | 094d740886eaf62fd219dacd11aa9a966758a962 (diff) | |
download | gitlab-ce-ed7065bbdb6f6fad3cc8fb369267fa811767c8a5.tar.gz |
Merge branch 'master' into 56937-edit-knative-domain-after-it-has-been-deployed56937-edit-knative-domain-after-it-has-been-deployed
Diffstat (limited to 'lib/gitlab/usage_data.rb')
-rw-r--r-- | lib/gitlab/usage_data.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index 38eda2097cb..0101ccc046a 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -90,8 +90,14 @@ module Gitlab todos: count(Todo), uploads: count(Upload), web_hooks: count(WebHook) - }.merge(services_usage).merge(approximate_counts) - } + } + .merge(services_usage) + .merge(approximate_counts) + }.tap do |data| + if Feature.enabled?(:group_overview_security_dashboard) + data[:counts][:user_preferences] = user_preferences_usage + end + end end # rubocop: enable CodeReuse/ActiveRecord @@ -159,6 +165,10 @@ module Gitlab } end + def user_preferences_usage + {} # augmented in EE + end + def count(relation, fallback: -1) relation.count rescue ActiveRecord::StatementInvalid |