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
2bc0d586
Commit
2bc0d586
authored
Jul 24, 2020
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes afte rebase
parent
500fa70b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+2
-4
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+6
-1
No files found.
ee/lib/ee/gitlab/usage_data.rb
View file @
2bc0d586
...
...
@@ -100,9 +100,6 @@ module EE
end
def
approval_rules_counts
# rubocop: disable UsageData/LargeTable:
projects_with_service_desk
=
::
Project
.
where
(
service_desk_enabled:
true
)
# rubocop: enable UsageData/LargeTable:
{
approval_project_rules:
count
(
ApprovalProjectRule
),
approval_project_rules_with_target_branch:
count
(
ApprovalProjectRulesProtectedBranch
,
:approval_project_rule_id
)
...
...
@@ -358,9 +355,10 @@ module EE
# rubocop:disable CodeReuse/ActiveRecord
def
projects_jira_issuelist_active
# rubocop: disable UsageData/LargeTable:
min_id
=
JiraTrackerData
.
where
(
issues_enabled:
true
).
minimum
(
:service_id
)
max_id
=
JiraTrackerData
.
where
(
issues_enabled:
true
).
maximum
(
:service_id
)
# rubocop: enable UsageData/LargeTable:
count
(
::
JiraService
.
active
.
includes
(
:jira_tracker_data
).
where
(
jira_tracker_data:
{
issues_enabled:
true
}),
start:
min_id
,
finish:
max_id
)
end
# rubocop:enable CodeReuse/ActiveRecord
...
...
lib/gitlab/usage_data.rb
View file @
2bc0d586
...
...
@@ -83,9 +83,11 @@ module Gitlab
auto_devops_enabled:
count
(
::
ProjectAutoDevops
.
enabled
),
auto_devops_disabled:
count
(
::
ProjectAutoDevops
.
disabled
),
deploy_keys:
count
(
DeployKey
),
# rubocop: disable UsageData/LargeTable:
deployments:
deployment_count
(
Deployment
),
successful_deployments:
deployment_count
(
Deployment
.
success
),
failed_deployments:
deployment_count
(
Deployment
.
failed
),
# rubocop: enable UsageData/LargeTable:
environments:
count
(
::
Environment
),
clusters:
count
(
::
Clusters
::
Cluster
),
clusters_enabled:
count
(
::
Clusters
::
Cluster
.
enabled
),
...
...
@@ -170,9 +172,11 @@ module Gitlab
def
system_usage_data_monthly
{
counts_monthly:
{
# rubocop: disable UsageData/LargeTable:
deployments:
deployment_count
(
Deployment
.
where
(
last_28_days_time_period
)),
successful_deployments:
deployment_count
(
Deployment
.
success
.
where
(
last_28_days_time_period
)),
failed_deployments:
deployment_count
(
Deployment
.
failed
.
where
(
last_28_days_time_period
)),
# rubocop: enable UsageData/LargeTable:
personal_snippets:
count
(
PersonalSnippet
.
where
(
last_28_days_time_period
)),
project_snippets:
count
(
ProjectSnippet
.
where
(
last_28_days_time_period
))
}.
tap
do
|
data
|
...
...
@@ -635,8 +639,9 @@ module Gitlab
# rubocop: disable CodeReuse/ActiveRecord
def
service_desk_counts
# rubocop: disable UsageData/LargeTable:
projects_with_service_desk
=
::
Project
.
where
(
service_desk_enabled:
true
)
# rubocop: enable UsageData/LargeTable:
{
service_desk_enabled_projects:
count
(
projects_with_service_desk
),
service_desk_issues:
count
(
...
...
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