diff --git a/app/components/layouts/page_heading_component.haml b/app/components/layouts/page_heading_component.haml index 3276d64b0e2aeba9c956b634b0bcbcb5c39618c7..f61d2e6aa0f973e5a491148755398d46dbfdc348 100644 --- a/app/components/layouts/page_heading_component.haml +++ b/app/components/layouts/page_heading_component.haml @@ -1,4 +1,4 @@ -.gl-flex.gl-flex-wrap.gl-items-center.gl-justify-between.gl-gap-y-2.gl-gap-x-5.gl-my-5 +.gl-flex.gl-flex-wrap.gl-items-center.gl-justify-between.gl-gap-y-2.gl-gap-x-5.gl-my-5{ @options } %h1.gl-heading-1{ class: '!gl-m-0', data: { testid: 'page-heading' } } = heading || @heading diff --git a/app/components/layouts/page_heading_component.rb b/app/components/layouts/page_heading_component.rb index 12cc278c77d87ea6e1d8ceebcadd88ce76647154..c7760299f5cd07a7964700d576fce8634aab2a00 100644 --- a/app/components/layouts/page_heading_component.rb +++ b/app/components/layouts/page_heading_component.rb @@ -3,8 +3,10 @@ module Layouts class PageHeadingComponent < ViewComponent::Base # @param [String] heading - def initialize(heading) + # @param [Hash] options + def initialize(heading, options: {}) @heading = heading + @options = options end renders_one :heading diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index 6f79e883833aba8f8d3799136246dea37ad234ed..3d766665aee197e7efc1367295b56ce8ba8c4edf 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -1,7 +1,7 @@ - page_title _("Groups") - add_page_specific_style 'page_bundles/search' -= render ::Layouts::PageHeadingComponent.new(_('Groups')) do |c| += render ::Layouts::PageHeadingComponent.new(_('Groups'), options: { data: { event_tracking_load: 'true', event_tracking: 'view_admin_groups_pageload' } }) do |c| - c.with_actions do = link_button_to new_admin_group_path, variant: :confirm do = _('New group') diff --git a/config/events/view_admin_groups_pageload.yml b/config/events/view_admin_groups_pageload.yml new file mode 100644 index 0000000000000000000000000000000000000000..2c4d4282b398735b57132f7cabfd70182e53f45e --- /dev/null +++ b/config/events/view_admin_groups_pageload.yml @@ -0,0 +1,16 @@ +--- +description: Tracks pageviews for the admin groups page +internal_events: true +action: view_admin_groups_pageload +identifiers: +- user +product_group: personal_productivity +milestone: '17.2' +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156807 +distributions: +- ce +- ee +tiers: +- free +- premium +- ultimate diff --git a/config/metrics/counts_28d/count_distinct_user_id_from_view_admin_groups_pageload_monthly.yml b/config/metrics/counts_28d/count_distinct_user_id_from_view_admin_groups_pageload_monthly.yml new file mode 100644 index 0000000000000000000000000000000000000000..86f7457cc8c2b18612ee8d6a312d919219519045 --- /dev/null +++ b/config/metrics/counts_28d/count_distinct_user_id_from_view_admin_groups_pageload_monthly.yml @@ -0,0 +1,22 @@ +--- +key_path: redis_hll_counters.count_distinct_user_id_from_view_admin_groups_pageload_monthly +description: Monthly count of unique users to the admin groups page +product_group: personal_productivity +performance_indicator_type: [] +value_type: number +status: active +milestone: '17.2' +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156807 +time_frame: 28d +data_source: internal_events +data_category: optional +distribution: +- ce +- ee +tier: +- free +- premium +- ultimate +events: +- name: view_admin_groups_pageload + unique: user.id diff --git a/config/metrics/counts_28d/count_total_view_admin_groups_pageload_monthly.yml b/config/metrics/counts_28d/count_total_view_admin_groups_pageload_monthly.yml new file mode 100644 index 0000000000000000000000000000000000000000..a550fa9e13fcd65a522af8d2492c6523cf005b71 --- /dev/null +++ b/config/metrics/counts_28d/count_total_view_admin_groups_pageload_monthly.yml @@ -0,0 +1,21 @@ +--- +key_path: counts.count_total_view_admin_groups_pageload_monthly +description: Monthly count of users to the admin groups page +product_group: personal_productivity +performance_indicator_type: [] +value_type: number +status: active +milestone: '17.2' +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156807 +time_frame: 28d +data_source: internal_events +data_category: optional +distribution: +- ce +- ee +tier: +- free +- premium +- ultimate +events: +- name: view_admin_groups_pageload diff --git a/config/metrics/counts_7d/count_distinct_user_id_from_view_admin_groups_pageload_weekly.yml b/config/metrics/counts_7d/count_distinct_user_id_from_view_admin_groups_pageload_weekly.yml new file mode 100644 index 0000000000000000000000000000000000000000..70bab6929f300d8a17d78391c74a6adfe7498b76 --- /dev/null +++ b/config/metrics/counts_7d/count_distinct_user_id_from_view_admin_groups_pageload_weekly.yml @@ -0,0 +1,22 @@ +--- +key_path: redis_hll_counters.count_distinct_user_id_from_view_admin_groups_pageload_weekly +description: Weekly count of unique users to the admin groups page +product_group: personal_productivity +performance_indicator_type: [] +value_type: number +status: active +milestone: '17.2' +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156807 +time_frame: 7d +data_source: internal_events +data_category: optional +distribution: +- ce +- ee +tier: +- free +- premium +- ultimate +events: +- name: view_admin_groups_pageload + unique: user.id diff --git a/config/metrics/counts_7d/count_total_view_admin_groups_pageload_weekly.yml b/config/metrics/counts_7d/count_total_view_admin_groups_pageload_weekly.yml new file mode 100644 index 0000000000000000000000000000000000000000..379202284920e20357e40b533bc5cfd0b4f6bc36 --- /dev/null +++ b/config/metrics/counts_7d/count_total_view_admin_groups_pageload_weekly.yml @@ -0,0 +1,21 @@ +--- +key_path: counts.count_total_view_admin_groups_pageload_weekly +description: Weekly count of users to the admin groups page +product_group: personal_productivity +performance_indicator_type: [] +value_type: number +status: active +milestone: '17.2' +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156807 +time_frame: 7d +data_source: internal_events +data_category: optional +distribution: +- ce +- ee +tier: +- free +- premium +- ultimate +events: +- name: view_admin_groups_pageload