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
821b4fde
Commit
821b4fde
authored
Dec 05, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add UsageData for group/project clusters
parent
d133c874
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+4
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+14
-2
No files found.
lib/gitlab/usage_data.rb
View file @
821b4fde
...
...
@@ -55,7 +55,11 @@ module Gitlab
environments:
count
(
::
Environment
),
clusters:
count
(
::
Clusters
::
Cluster
),
clusters_enabled:
count
(
::
Clusters
::
Cluster
.
enabled
),
project_clusters_enabled:
count
(
::
Clusters
::
Cluster
.
enabled
.
project_type
),
group_clusters_enabled:
count
(
::
Clusters
::
Cluster
.
enabled
.
group_type
),
clusters_disabled:
count
(
::
Clusters
::
Cluster
.
disabled
),
project_clusters_disabled:
count
(
::
Clusters
::
Cluster
.
disabled
.
project_type
),
group_clusters_disabled:
count
(
::
Clusters
::
Cluster
.
disabled
.
group_type
),
clusters_platforms_gke:
count
(
::
Clusters
::
Cluster
.
gcp_installed
.
enabled
),
clusters_platforms_user:
count
(
::
Clusters
::
Cluster
.
user_provided
.
enabled
),
clusters_applications_helm:
count
(
::
Clusters
::
Applications
::
Helm
.
installed
),
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
821b4fde
...
...
@@ -17,6 +17,9 @@ describe Gitlab::UsageData do
gcp_cluster
=
create
(
:cluster
,
:provided_by_gcp
)
create
(
:cluster
,
:provided_by_user
)
create
(
:cluster
,
:provided_by_user
,
:disabled
)
create
(
:cluster
,
:group
)
create
(
:cluster
,
:group
,
:disabled
)
create
(
:cluster
,
:group
,
:disabled
)
create
(
:clusters_applications_helm
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_ingress
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_cert_managers
,
:installed
,
cluster:
gcp_cluster
)
...
...
@@ -77,7 +80,11 @@ describe Gitlab::UsageData do
environments
clusters
clusters_enabled
project_clusters_enabled
group_clusters_enabled
clusters_disabled
project_clusters_disabled
group_clusters_disabled
clusters_platforms_gke
clusters_platforms_user
clusters_applications_helm
...
...
@@ -127,8 +134,13 @@ describe Gitlab::UsageData do
expect
(
count_data
[
:projects_slack_notifications_active
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_slack_slash_active
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_enabled
]).
to
eq
(
6
)
expect
(
count_data
[
:clusters_disabled
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_enabled
]).
to
eq
(
7
)
expect
(
count_data
[
:project_clusters_enabled
]).
to
eq
(
6
)
expect
(
count_data
[
:group_clusters_enabled
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_disabled
]).
to
eq
(
3
)
expect
(
count_data
[
:project_clusters_disabled
]).
to
eq
(
1
)
expect
(
count_data
[
:group_clusters_disabled
]).
to
eq
(
2
)
expect
(
count_data
[
:group_clusters_enabled
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_platforms_gke
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_platforms_user
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_helm
]).
to
eq
(
1
)
...
...
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