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:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-10-01 14:15:31 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-10-01 18:11:09 +0300
commit9b2e17ac71ee446da0f34dada41401803af816c7 (patch)
treea352314d1cd94dcfd43566997f119d6bdc8730ce /lib/gitlab/usage_data.rb
parentd924176117f3cc73f539ed90b47e1912a3478cf0 (diff)
Adds WebIDE commits to UsagePing
Implements UsageCounters model to track feature usage counters and makes easy to extend for future counters
Diffstat (limited to 'lib/gitlab/usage_data.rb')
-rw-r--r--lib/gitlab/usage_data.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index f7d8ee571cd..afab36e89dd 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -10,6 +10,7 @@ module Gitlab
.merge(features_usage_data)
.merge(components_usage_data)
.merge(cycle_analytics_usage_data)
+ .merge(usage_counters)
end
def to_json(force_refresh: false)
@@ -106,6 +107,10 @@ module Gitlab
}
end
+ def usage_counters
+ UsageCounters.first_or_create.totals
+ end
+
def components_usage_data
{
gitlab_pages: { enabled: Gitlab.config.pages.enabled, version: Gitlab::Pages::VERSION },