2018-07-18 00:37:58 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-09-10 18:08:54 +00:00
|
|
|
class Admin::DevOpsReportController < Admin::ApplicationController
|
2022-08-12 00:09:35 +00:00
|
|
|
include ProductAnalyticsTracking
|
2020-06-22 15:09:27 +00:00
|
|
|
|
2021-01-18 12:10:41 +00:00
|
|
|
helper_method :show_adoption?
|
|
|
|
|
2022-08-12 00:09:35 +00:00
|
|
|
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? }
|
2020-06-22 15:09:27 +00:00
|
|
|
|
2020-10-05 21:08:47 +00:00
|
|
|
feature_category :devops_reports
|
|
|
|
|
2022-03-04 18:20:01 +00:00
|
|
|
urgency :low
|
|
|
|
|
2018-08-27 15:31:01 +00:00
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2020-08-21 18:10:24 +00:00
|
|
|
def show
|
2020-09-10 18:08:54 +00:00
|
|
|
@metric = DevOpsReport::Metric.order(:created_at).last&.present
|
2018-07-18 00:37:58 +00:00
|
|
|
end
|
2018-08-27 15:31:01 +00:00
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2021-01-18 12:10:41 +00:00
|
|
|
|
|
|
|
def show_adoption?
|
|
|
|
false
|
|
|
|
end
|
2021-04-02 12:09:15 +00:00
|
|
|
|
|
|
|
def should_track_devops_score?
|
|
|
|
true
|
|
|
|
end
|
2022-08-12 00:09:35 +00:00
|
|
|
|
|
|
|
def tracking_namespace_source
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def tracking_project_source
|
|
|
|
nil
|
|
|
|
end
|
2018-07-18 00:37:58 +00:00
|
|
|
end
|
2021-01-18 12:10:41 +00:00
|
|
|
|
2021-05-11 21:10:21 +00:00
|
|
|
Admin::DevOpsReportController.prepend_mod_with('Admin::DevOpsReportController')
|