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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
dc63b952
Commit
dc63b952
authored
Apr 12, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add edition to usage ping
parent
adf48b90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+14
-1
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+2
-1
No files found.
lib/gitlab/usage_data.rb
View file @
dc63b952
...
...
@@ -72,12 +72,14 @@ module Gitlab
version:
Gitlab
::
VERSION
,
active_user_count:
User
.
active
.
count
,
recorded_at:
Time
.
now
,
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
,
edition:
'EE'
}
license
=
::
License
.
current
if
license
usage_data
[
:edition
]
=
license_edition
(
license
.
plan
)
usage_data
[
:license_md5
]
=
Digest
::
MD5
.
hexdigest
(
license
.
data
)
usage_data
[
:historical_max_users
]
=
::
HistoricalData
.
max_historical_user_count
usage_data
[
:licensee
]
=
license
.
licensee
...
...
@@ -89,6 +91,17 @@ module Gitlab
usage_data
end
def
license_edition
(
plan
)
case
plan
when
'premium'
'EEP'
when
'starter'
'EES'
when
nil
# Older licenses
'EE'
end
end
end
end
end
spec/lib/gitlab/usage_data_spec.rb
View file @
dc63b952
...
...
@@ -20,8 +20,9 @@ describe Gitlab::UsageData do
licensee
license_md5
recorded_at
version
mattermost_enabled
edition
version
uuid
)
)
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