Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
60bd0a24
Commit
60bd0a24
authored
Feb 06, 2019
by
Victor Zagorodny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user_preferences_usage to usage ping
parent
885e2a9c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+8
-1
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+1
-0
No files found.
lib/gitlab/usage_data.rb
View file @
60bd0a24
...
...
@@ -90,7 +90,10 @@ module Gitlab
todos:
count
(
Todo
),
uploads:
count
(
Upload
),
web_hooks:
count
(
WebHook
)
}.
merge
(
services_usage
).
merge
(
approximate_counts
)
}
.
merge
(
services_usage
)
.
merge
(
approximate_counts
)
.
merge
(
user_preferences:
user_preferences_usage
)
}
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
@@ -159,6 +162,10 @@ module Gitlab
}
end
def
user_preferences_usage
{}
# augmented in EE
end
def
count
(
relation
,
fallback:
-
1
)
relation
.
count
rescue
ActiveRecord
::
StatementInvalid
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
60bd0a24
...
...
@@ -124,6 +124,7 @@ describe Gitlab::UsageData do
todos
uploads
web_hooks
user_preferences
)
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment