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
d2d12c8e
Commit
d2d12c8e
authored
Oct 04, 2019
by
Alex Buijs
Committed by
Mayra Cabrera
Oct 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add usage statistics data for secure stage
Added usage activity data for the secure stage
parent
8229b1d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+10
-0
ee/spec/lib/ee/gitlab/usage_data_spec.rb
ee/spec/lib/ee/gitlab/usage_data_spec.rb
+10
-0
No files found.
ee/lib/ee/gitlab/usage_data.rb
View file @
d2d12c8e
...
@@ -175,6 +175,7 @@ module EE
...
@@ -175,6 +175,7 @@ module EE
package:
usage_activity_by_stage_package
,
package:
usage_activity_by_stage_package
,
plan:
usage_activity_by_stage_plan
,
plan:
usage_activity_by_stage_plan
,
release:
usage_activity_by_stage_release
,
release:
usage_activity_by_stage_release
,
secure:
usage_activity_by_stage_secure
,
verify:
usage_activity_by_stage_verify
verify:
usage_activity_by_stage_verify
}
}
}
}
...
@@ -270,6 +271,15 @@ module EE
...
@@ -270,6 +271,15 @@ module EE
projects_reporting_ci_cd_back_to_github:
::
Project
.
with_github_service_pipeline_events
.
distinct_count_by
(
:creator_id
)
projects_reporting_ci_cd_back_to_github:
::
Project
.
with_github_service_pipeline_events
.
distinct_count_by
(
:creator_id
)
}
}
end
end
# Currently too complicated and to get reliable counts for these stats:
# container_scanning_jobs, dast_jobs, dependency_scanning_jobs, license_management_jobs, sast_jobs
# Once https://gitlab.com/gitlab-org/gitlab/merge_requests/17568 is merged, this might be doable
def
usage_activity_by_stage_secure
{
user_preferences_group_overview_security_dashboard:
count
(
::
User
.
active
.
group_view_security_dashboard
)
}
end
end
end
end
end
end
end
...
...
ee/spec/lib/ee/gitlab/usage_data_spec.rb
View file @
d2d12c8e
...
@@ -170,6 +170,16 @@ describe Gitlab::UsageData do
...
@@ -170,6 +170,16 @@ describe Gitlab::UsageData do
end
end
end
end
context
'for secure'
do
it
'includes accurate usage_activity_by_stage data'
do
create
(
:user
,
group_view: :security_dashboard
)
expect
(
described_class
.
uncached_data
[
:usage_activity_by_stage
][
:secure
]).
to
eq
(
user_preferences_group_overview_security_dashboard:
1
)
end
end
context
'for verify'
do
context
'for verify'
do
it
'includes accurate usage_activity_by_stage data'
do
it
'includes accurate usage_activity_by_stage data'
do
user
=
create
(
:user
)
user
=
create
(
:user
)
...
...
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