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
800816c2
Commit
800816c2
authored
Dec 10, 2021
by
Jannik Lehmann
Committed by
Vitaly Slobodin
Dec 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add License Compliance MR Widget Tracking events
parent
9618f99c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
203 additions
and
2 deletions
+203
-2
config/metrics/counts_28d/20211201140658_users_expanding_testing_license_compliance_report_monthly.yml
...s_expanding_testing_license_compliance_report_monthly.yml
+25
-0
config/metrics/counts_28d/20211201154341_users_visiting_license_compliance_full_report_monthly.yml
...users_visiting_license_compliance_full_report_monthly.yml
+25
-0
config/metrics/counts_28d/20211202094237_users_visiting_manage_license_compliance_monthly.yml
...4237_users_visiting_manage_license_compliance_monthly.yml
+25
-0
config/metrics/counts_7d/20211126154206_users_expanding_testing_license_compliance_report_weekly.yml
...rs_expanding_testing_license_compliance_report_weekly.yml
+25
-0
config/metrics/counts_7d/20211201154118_users_visiting_license_compliance_full_report_weekly.yml
..._users_visiting_license_compliance_full_report_weekly.yml
+25
-0
config/metrics/counts_7d/20211202094430_users_visiting_manage_license_compliance_weekly.yml
...94430_users_visiting_manage_license_compliance_weekly.yml
+25
-0
ee/app/assets/javascripts/vue_shared/license_compliance/mr_widget_license_report.vue
...ue_shared/license_compliance/mr_widget_license_report.vue
+9
-2
ee/spec/frontend/vue_shared/license_compliance/mr_widget_license_report_spec.js
...hared/license_compliance/mr_widget_license_report_spec.js
+31
-0
lib/gitlab/usage_data_counters/known_events/common.yml
lib/gitlab/usage_data_counters/known_events/common.yml
+13
-0
No files found.
config/metrics/counts_28d/20211201140658_users_expanding_testing_license_compliance_report_monthly.yml
0 → 100644
View file @
800816c2
---
data_category
:
optional
key_path
:
redis_hll_counters.testing.users_expanding_testing_license_compliance_report_monthly
description
:
Count of expanding the license compliance widget
product_section
:
sec
product_stage
:
secure
product_group
:
group::static analysis
product_category
:
dependency_scanning
value_type
:
number
status
:
active
milestone
:
'
14.6'
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75643
time_frame
:
28d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
users_expanding_testing_license_compliance_report
distribution
:
-
ce
-
ee
tier
:
-
free
-
premium
-
ultimate
config/metrics/counts_28d/20211201154341_users_visiting_license_compliance_full_report_monthly.yml
0 → 100644
View file @
800816c2
---
data_category
:
optional
key_path
:
redis_hll_counters.testing.users_visiting_testing_license_compliance_full_report_monthly
description
:
Count of visiting the license compliance full report
product_section
:
sec
product_stage
:
secure
product_group
:
group::static analysis
product_category
:
dependency_scanning
value_type
:
number
status
:
active
milestone
:
'
14.6'
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75643
time_frame
:
28d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
users_visiting_testing_license_compliance_full_report
distribution
:
-
ce
-
ee
tier
:
-
free
-
premium
-
ultimate
config/metrics/counts_28d/20211202094237_users_visiting_manage_license_compliance_monthly.yml
0 → 100644
View file @
800816c2
---
data_category
:
optional
key_path
:
redis_hll_counters.testing.users_visiting_testing_manage_license_compliance_monthly
description
:
Count of visiting the manage license compliance page
product_section
:
sec
product_stage
:
secure
product_group
:
group::static analysis
product_category
:
dependency_scanning
value_type
:
number
status
:
active
milestone
:
'
14.6'
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75643
time_frame
:
28d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
users_visiting_testing_manage_license_compliance
distribution
:
-
ce
-
ee
tier
:
-
free
-
premium
-
ultimate
config/metrics/counts_7d/20211126154206_users_expanding_testing_license_compliance_report_weekly.yml
0 → 100644
View file @
800816c2
---
data_category
:
optional
key_path
:
redis_hll_counters.testing.users_expanding_testing_license_compliance_report_weekly
description
:
Count of expanding the license compliance widget
product_section
:
sec
product_stage
:
secure
product_group
:
group::static analysis
product_category
:
dependency_scanning
value_type
:
number
status
:
active
milestone
:
'
14.6'
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75643
time_frame
:
7d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
users_expanding_testing_license_compliance_report
distribution
:
-
ce
-
ee
tier
:
-
free
-
premium
-
ultimate
config/metrics/counts_7d/20211201154118_users_visiting_license_compliance_full_report_weekly.yml
0 → 100644
View file @
800816c2
---
data_category
:
optional
key_path
:
redis_hll_counters.testing.users_visiting_testing_license_compliance_full_report_weekly
description
:
Count of visiting the license compliance full report
product_section
:
sec
product_stage
:
secure
product_group
:
group::static analysis
product_category
:
dependency_scanning
value_type
:
number
status
:
active
milestone
:
'
14.6'
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75643
time_frame
:
7d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
users_visiting_testing_license_compliance_full_report
distribution
:
-
ce
-
ee
tier
:
-
free
-
premium
-
ultimate
config/metrics/counts_7d/20211202094430_users_visiting_manage_license_compliance_weekly.yml
0 → 100644
View file @
800816c2
---
data_category
:
optional
key_path
:
redis_hll_counters.testing.users_visiting_testing_manage_license_compliance_weekly
description
:
Count of visiting the manage license compliance page
product_section
:
sec
product_stage
:
secure
product_group
:
group::static analysis
product_category
:
dependency_scanning
value_type
:
number
status
:
active
milestone
:
'
14.6'
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75643
time_frame
:
7d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
users_visiting_testing_manage_license_compliance
distribution
:
-
ce
-
ee
tier
:
-
free
-
premium
-
ultimate
ee/app/assets/javascripts/vue_shared/license_compliance/mr_widget_license_report.vue
View file @
800816c2
<
script
>
import
{
GlLink
,
GlIcon
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
mapState
,
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
api
from
'
~/api
'
;
import
{
componentNames
,
iconComponentNames
}
from
'
ee/reports/components/issue_body
'
;
import
{
LICENSE_MANAGEMENT
}
from
'
ee/vue_shared/license_compliance/store/constants
'
;
import
reportsMixin
from
'
ee/vue_shared/security_reports/mixins/reports_mixin
'
;
...
...
@@ -111,6 +112,9 @@ export default {
this
.
fetchLicenseCheckApprovalRule
();
},
methods
:
{
trackVisitedPath
(
trackAction
)
{
api
.
trackRedisHllUserEvent
(
trackAction
);
},
...
mapActions
(
LICENSE_MANAGEMENT
,
[
'
setAPISettings
'
,
'
fetchParsedLicenseReport
'
,
...
...
@@ -129,6 +133,7 @@ export default {
:has-issues=
"hasLicenseReportIssues"
:component=
"$options.componentNames.LicenseIssueBody"
:class=
"reportSectionClass"
track-action=
"users_expanding_testing_license_compliance_report"
:always-open=
"alwaysOpen"
class=
"license-report-widget mr-report"
data-qa-selector=
"license_report_widget"
...
...
@@ -184,10 +189,11 @@ export default {
<gl-button
v-if=
"fullReportPath"
:href=
"fullReportPath"
target=
"_blank"
data-testid=
"full-report-button"
class=
"gl-mr-3"
icon=
"external-link"
target=
"_blank"
data-testid=
"full-report-button"
@
click=
"trackVisitedPath('users_visiting_testing_license_compliance_full_report')"
>
{{
s__
(
'
ciReport|View full report
'
)
}}
</gl-button>
...
...
@@ -197,6 +203,7 @@ export default {
:class=
"
{ 'gl-mr-3': isCollapsible }"
:href="licenseManagementSettingsPath"
data-qa-selector="manage_licenses_button"
@click="trackVisitedPath('users_visiting_testing_manage_license_compliance')"
>
{{
s__
(
'
ciReport|Manage licenses
'
)
}}
</gl-button>
...
...
ee/spec/frontend/vue_shared/license_compliance/mr_widget_license_report_spec.js
View file @
800816c2
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
api
from
'
~/api
'
;
import
LicenseManagement
from
'
ee/vue_shared/license_compliance/mr_widget_license_report.vue
'
;
import
{
stubComponent
}
from
'
helpers/stub_component
'
;
import
{
TEST_HOST
}
from
'
spec/test_constants
'
;
...
...
@@ -116,6 +117,36 @@ describe('License Report MR Widget', () => {
});
});
describe
(
'
snowplow
'
,
()
=>
{
let
trackEventSpy
;
beforeEach
(()
=>
{
mountComponent
();
trackEventSpy
=
jest
.
spyOn
(
api
,
'
trackRedisHllUserEvent
'
).
mockImplementation
(()
=>
{});
});
afterEach
(()
=>
{
trackEventSpy
.
mockRestore
();
});
it
(
'
tracks users_visiting_testing_license_compliance_full_report
'
,
()
=>
{
wrapper
.
find
(
'
[data-testid="full-report-button"]
'
).
vm
.
$emit
(
'
click
'
);
expect
(
trackEventSpy
).
toHaveBeenCalledWith
(
'
users_visiting_testing_license_compliance_full_report
'
,
);
});
it
(
'
tracks users_visiting_testing_manage_license_compliance
'
,
()
=>
{
wrapper
.
find
(
'
[data-testid="manage-licenses-button"]
'
).
vm
.
$emit
(
'
click
'
);
expect
(
trackEventSpy
).
toHaveBeenCalledWith
(
'
users_visiting_testing_manage_license_compliance
'
,
);
});
});
describe
(
'
licenseReportStatus
'
,
()
=>
{
it
(
'
should be `LOADING`, if the report is loading
'
,
()
=>
{
const
getters
=
{
...
...
lib/gitlab/usage_data_counters/known_events/common.yml
View file @
800816c2
...
...
@@ -355,6 +355,19 @@
category
:
testing
aggregation
:
weekly
feature_flag
:
users_expanding_widgets_usage_data
-
name
:
users_expanding_testing_license_compliance_report
redis_slot
:
testing
category
:
testing
aggregation
:
weekly
feature_flag
:
users_expanding_widgets_usage_data
-
name
:
users_visiting_testing_license_compliance_full_report
redis_slot
:
testing
category
:
testing
aggregation
:
weekly
-
name
:
users_visiting_testing_manage_license_compliance
redis_slot
:
testing
category
:
testing
aggregation
:
weekly
# Container Security - Network Policies
-
name
:
clusters_using_network_policies_ui
redis_slot
:
network_policies
...
...
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