Commit 33cd7b5c authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/324759/trackWidgetSections' into 'master'

Added tracking events to widget sections [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!57133
parents 0f1517b6 1ad400a8
......@@ -46,6 +46,7 @@ export default {
:loading-text="groupedSummaryText"
:error-text="groupedSummaryText"
:has-issues="shouldRenderIssuesList"
track-action="users_expanding_testing_accessibility_report"
class="mr-widget-section grouped-security-reports mr-report"
>
<template #body>
......
......@@ -87,6 +87,7 @@ export default {
:component="$options.componentNames.CodequalityIssueBody"
:popover-options="codequalityPopover"
:show-report-section-status-icon="false"
track-action="users_expanding_testing_code_quality_report"
class="js-codequality-widget mr-widget-border-top mr-report"
>
<template v-if="hasError" #sub-heading>{{ statusReason }}</template>
......
<script>
import { GlButton } from '@gitlab/ui';
import api from '~/api';
import { __ } from '~/locale';
import StatusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue';
import Popover from '~/vue_shared/components/help_popover.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { status, SLOT_SUCCESS, SLOT_LOADING, SLOT_ERROR } from '../constants';
import IssuesList from './issues_list.vue';
......@@ -14,6 +16,7 @@ export default {
Popover,
StatusIcon,
},
mixins: [glFeatureFlagsMixin()],
props: {
alwaysOpen: {
type: Boolean,
......@@ -98,6 +101,11 @@ export default {
required: false,
default: false,
},
trackAction: {
type: String,
required: false,
default: null,
},
},
data() {
......@@ -164,6 +172,10 @@ export default {
},
methods: {
toggleCollapsed() {
if (this.trackAction && this.glFeatures.usersExpandingWidgetsUsageData) {
api.trackRedisHllUserEvent(this.trackAction);
}
if (this.shouldEmitToggleEvent) {
this.$emit('toggleEvent');
}
......
......@@ -184,6 +184,7 @@ export default {
:has-issues="false"
class="mr-widget-border-top mr-report"
data-testid="security-mr-widget"
track-action="users_expanding_secure_security_report"
>
<template v-for="slot in $options.summarySlots" #[slot]>
<span :key="slot">
......@@ -212,6 +213,7 @@ export default {
:has-issues="false"
class="mr-widget-border-top mr-report"
data-testid="security-mr-widget"
track-action="users_expanding_secure_security_report"
>
<template #error>
{{ $options.i18n.scansHaveRun }}
......
......@@ -43,6 +43,9 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:usage_data_i_testing_summary_widget_total, @project, default_enabled: :yaml)
push_frontend_feature_flag(:improved_emoji_picker, project, default_enabled: :yaml)
# Usage data feature flags
push_frontend_feature_flag(:users_expanding_widgets_usage_data, @project, default_enabled: :yaml)
record_experiment_user(:invite_members_version_b)
experiment(:invite_members_in_comment, namespace: @project.root_ancestor) do |experiment_instance|
......
---
name: users_expanding_widgets_usage_data
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57133
rollout_issue_url:
milestone: '13.11'
type: development
group: group::code review
default_enabled: true
---
key_path: redis_hll_counters.secure.users_expanding_secure_security_report_monthly
description: Count of expanding the security report widget
product_section: sec
product_stage: secure
product_group: group::static analysis
product_category: dependency_scanning
value_type: number
status: implemented
milestone: '13.11'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57133
time_frame: 28d
data_source: redis_hll
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
---
key_path: redis_hll_counters.testing.users_expanding_testing_code_quality_report_monthly
description: Count of expanding the code quality widget
product_section: ops
product_stage: verify
product_group: group::testing
product_category: code_quality
value_type: number
status: implemented
milestone: '13.11'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57133
time_frame: 28d
data_source: redis_hll
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
---
key_path: redis_hll_counters.testing.users_expanding_testing_accessibility_report_monthly
description: Count of expanding the accessibility report widget
product_section: ops
product_stage: verify
product_group: group::testing
product_category: accessibility_testing
value_type: number
status: implemented
milestone: '13.11'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57133
time_frame: 28d
data_source: redis_hll
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
---
key_path: redis_hll_counters.secure.users_expanding_secure_security_report_weekly
description: Count of expanding the security report widget
product_section: sec
product_stage: secure
product_group: group::static analysis
product_category: dependency_scanning
value_type: number
status: implemented
milestone: '13.11'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57133
time_frame: 7d
data_source: redis_hll
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
---
key_path: redis_hll_counters.testing.users_expanding_testing_code_quality_report_weekly
description: Count of expanding the code quality widget
product_section: ops
product_stage: verify
product_group: group::testing
product_category: code_quality
value_type: number
status: implemented
milestone: '13.11'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57133
time_frame: 7d
data_source: redis_hll
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
---
key_path: redis_hll_counters.testing.users_expanding_testing_accessibility_report_weekly
description: Count of expanding the accessibility report widget
product_section: ops
product_stage: verify
product_group: group::testing
product_category: accessibility_testing
value_type: number
status: implemented
milestone: '13.11'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57133
time_frame: 7d
data_source: redis_hll
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
......@@ -13448,6 +13448,30 @@ Status: `data_available`
Tiers: `free`, `premium`, `ultimate`
### `redis_hll_counters.secure.users_expanding_secure_security_report_monthly`
Count of expanding the security report widget
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210409095855_users_expanding_secure_security_report_monthly.yml)
Group: `group::static analysis`
Status: `implemented`
Tiers: `free`, `premium`, `ultimate`
### `redis_hll_counters.secure.users_expanding_secure_security_report_weekly`
Count of expanding the security report widget
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210409095855_users_expanding_secure_security_report_weekly.yml)
Group: `group::static analysis`
Status: `implemented`
Tiers: `free`, `premium`, `ultimate`
### `redis_hll_counters.snippets.i_snippets_show_monthly`
Missing description
......@@ -13880,6 +13904,54 @@ Status: `removed`
Tiers: `premium`, `ultimate`
### `redis_hll_counters.testing.users_expanding_testing_accessibility_report_monthly`
Count of expanding the accessibility report widget
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210409100628_users_expanding_testing_accessibility_report_monthly.yml)
Group: `group::testing`
Status: `implemented`
Tiers: `free`, `premium`, `ultimate`
### `redis_hll_counters.testing.users_expanding_testing_accessibility_report_weekly`
Count of expanding the accessibility report widget
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210409100628_users_expanding_testing_accessibility_report_weekly.yml)
Group: `group::testing`
Status: `implemented`
Tiers: `free`, `premium`, `ultimate`
### `redis_hll_counters.testing.users_expanding_testing_code_quality_report_monthly`
Count of expanding the code quality widget
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210409100451_users_expanding_testing_code_quality_report_monthly.yml)
Group: `group::testing`
Status: `implemented`
Tiers: `free`, `premium`, `ultimate`
### `redis_hll_counters.testing.users_expanding_testing_code_quality_report_weekly`
Count of expanding the code quality widget
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210409100451_users_expanding_testing_code_quality_report_weekly.yml)
Group: `group::testing`
Status: `implemented`
Tiers: `free`, `premium`, `ultimate`
### `redis_hll_counters.user_packages.i_package_composer_user_monthly`
Missing description
......
......@@ -457,6 +457,7 @@ export default {
:should-emit-toggle-event="true"
class="mr-widget-border-top grouped-security-reports mr-report"
data-qa-selector="vulnerability_report_grouped"
track-action="users_expanding_security_report"
@toggleEvent="handleToggleEvent"
>
<template v-for="slot in $options.summarySlots" #[slot]>
......
......@@ -460,3 +460,19 @@
redis_slot: pipeline_authoring
aggregation: weekly
feature_flag: usage_data_o_pipeline_authoring_unique_users_pushing_mr_ciconfigfile
# Merge request widgets
- name: users_expanding_secure_security_report
redis_slot: secure
category: secure
aggregation: weekly
feature_flag: users_expanding_widgets_usage_data
- name: users_expanding_testing_code_quality_report
redis_slot: testing
category: testing
aggregation: weekly
feature_flag: users_expanding_widgets_usage_data
- name: users_expanding_testing_accessibility_report
redis_slot: testing
category: testing
aggregation: weekly
feature_flag: users_expanding_widgets_usage_data
......@@ -44,7 +44,8 @@ RSpec.describe Gitlab::UsageDataCounters::HLLRedisCounter, :clean_gitlab_redis_s
'ci_templates',
'quickactions',
'pipeline_authoring',
'epics_usage'
'epics_usage',
'secure'
)
end
end
......
......@@ -1362,7 +1362,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
let(:categories) { ::Gitlab::UsageDataCounters::HLLRedisCounter.categories }
let(:ineligible_total_categories) do
%w[source_code ci_secrets_management incident_management_alerts snippets terraform incident_management_oncall]
%w[source_code ci_secrets_management incident_management_alerts snippets terraform incident_management_oncall secure]
end
context 'with redis_hll_tracking feature enabled' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment