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
Show 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
>
<
script
>
import
{
GlLink
,
GlIcon
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlLink
,
GlIcon
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
mapState
,
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
{
mapState
,
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
api
from
'
~/api
'
;
import
{
componentNames
,
iconComponentNames
}
from
'
ee/reports/components/issue_body
'
;
import
{
componentNames
,
iconComponentNames
}
from
'
ee/reports/components/issue_body
'
;
import
{
LICENSE_MANAGEMENT
}
from
'
ee/vue_shared/license_compliance/store/constants
'
;
import
{
LICENSE_MANAGEMENT
}
from
'
ee/vue_shared/license_compliance/store/constants
'
;
import
reportsMixin
from
'
ee/vue_shared/security_reports/mixins/reports_mixin
'
;
import
reportsMixin
from
'
ee/vue_shared/security_reports/mixins/reports_mixin
'
;
...
@@ -111,6 +112,9 @@ export default {
...
@@ -111,6 +112,9 @@ export default {
this
.
fetchLicenseCheckApprovalRule
();
this
.
fetchLicenseCheckApprovalRule
();
},
},
methods
:
{
methods
:
{
trackVisitedPath
(
trackAction
)
{
api
.
trackRedisHllUserEvent
(
trackAction
);
},
...
mapActions
(
LICENSE_MANAGEMENT
,
[
...
mapActions
(
LICENSE_MANAGEMENT
,
[
'
setAPISettings
'
,
'
setAPISettings
'
,
'
fetchParsedLicenseReport
'
,
'
fetchParsedLicenseReport
'
,
...
@@ -129,6 +133,7 @@ export default {
...
@@ -129,6 +133,7 @@ export default {
:has-issues=
"hasLicenseReportIssues"
:has-issues=
"hasLicenseReportIssues"
:component=
"$options.componentNames.LicenseIssueBody"
:component=
"$options.componentNames.LicenseIssueBody"
:class=
"reportSectionClass"
:class=
"reportSectionClass"
track-action=
"users_expanding_testing_license_compliance_report"
:always-open=
"alwaysOpen"
:always-open=
"alwaysOpen"
class=
"license-report-widget mr-report"
class=
"license-report-widget mr-report"
data-qa-selector=
"license_report_widget"
data-qa-selector=
"license_report_widget"
...
@@ -184,10 +189,11 @@ export default {
...
@@ -184,10 +189,11 @@ export default {
<gl-button
<gl-button
v-if=
"fullReportPath"
v-if=
"fullReportPath"
:href=
"fullReportPath"
:href=
"fullReportPath"
target=
"_blank"
data-testid=
"full-report-button"
class=
"gl-mr-3"
class=
"gl-mr-3"
icon=
"external-link"
icon=
"external-link"
target=
"_blank"
data-testid=
"full-report-button"
@
click=
"trackVisitedPath('users_visiting_testing_license_compliance_full_report')"
>
>
{{
s__
(
'
ciReport|View full report
'
)
}}
{{
s__
(
'
ciReport|View full report
'
)
}}
</gl-button>
</gl-button>
...
@@ -197,6 +203,7 @@ export default {
...
@@ -197,6 +203,7 @@ export default {
:class=
"
{ 'gl-mr-3': isCollapsible }"
:class=
"
{ 'gl-mr-3': isCollapsible }"
:href="licenseManagementSettingsPath"
:href="licenseManagementSettingsPath"
data-qa-selector="manage_licenses_button"
data-qa-selector="manage_licenses_button"
@click="trackVisitedPath('users_visiting_testing_manage_license_compliance')"
>
>
{{
s__
(
'
ciReport|Manage licenses
'
)
}}
{{
s__
(
'
ciReport|Manage licenses
'
)
}}
</gl-button>
</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
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
api
from
'
~/api
'
;
import
LicenseManagement
from
'
ee/vue_shared/license_compliance/mr_widget_license_report.vue
'
;
import
LicenseManagement
from
'
ee/vue_shared/license_compliance/mr_widget_license_report.vue
'
;
import
{
stubComponent
}
from
'
helpers/stub_component
'
;
import
{
stubComponent
}
from
'
helpers/stub_component
'
;
import
{
TEST_HOST
}
from
'
spec/test_constants
'
;
import
{
TEST_HOST
}
from
'
spec/test_constants
'
;
...
@@ -116,6 +117,36 @@ describe('License Report MR Widget', () => {
...
@@ -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
'
,
()
=>
{
describe
(
'
licenseReportStatus
'
,
()
=>
{
it
(
'
should be `LOADING`, if the report is loading
'
,
()
=>
{
it
(
'
should be `LOADING`, if the report is loading
'
,
()
=>
{
const
getters
=
{
const
getters
=
{
...
...
lib/gitlab/usage_data_counters/known_events/common.yml
View file @
800816c2
...
@@ -355,6 +355,19 @@
...
@@ -355,6 +355,19 @@
category
:
testing
category
:
testing
aggregation
:
weekly
aggregation
:
weekly
feature_flag
:
users_expanding_widgets_usage_data
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
# Container Security - Network Policies
-
name
:
clusters_using_network_policies_ui
-
name
:
clusters_using_network_policies_ui
redis_slot
:
network_policies
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