blob: 71ee19ddf393b22ac3591e61ab7b5e9f863d0964 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# frozen_string_literal: true
class Admin::DevOpsReportController < Admin::ApplicationController
include ProductAnalyticsTracking
helper_method :show_adoption?
track_custom_event :show,
name: 'i_analytics_dev_ops_score',
action: 'perform_analytics_usage_action',
label: 'redis_hll_counters.analytics.analytics_total_unique_counts_monthly',
destinations: %i[redis_hll snowplow],
conditions: -> { should_track_devops_score? }
feature_category :devops_reports
urgency :low
# rubocop: disable CodeReuse/ActiveRecord
def show
@metric = DevOpsReport::Metric.order(:created_at).last&.present
end
# rubocop: enable CodeReuse/ActiveRecord
def show_adoption?
false
end
def should_track_devops_score?
true
end
def tracking_namespace_source
nil
end
def tracking_project_source
nil
end
end
Admin::DevOpsReportController.prepend_mod_with('Admin::DevOpsReportController')
|