debian-mirror-gitlab/app/controllers/admin/dev_ops_report_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
942 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# frozen_string_literal: true
class Admin::DevOpsReportController < Admin::ApplicationController
2022-08-27 11:52:29 +05:30
include ProductAnalyticsTracking
2020-11-24 15:15:51 +05:30
2021-03-08 18:12:59 +05:30
helper_method :show_adoption?
2022-08-27 11:52:29 +05:30
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-11-24 15:15:51 +05:30
2021-01-03 14:25:43 +05:30
feature_category :devops_reports
2022-05-07 20:08:51 +05:30
urgency :low
2020-11-24 15:15:51 +05:30
# rubocop: disable CodeReuse/ActiveRecord
def show
@metric = DevOpsReport::Metric.order(:created_at).last&.present
end
# rubocop: enable CodeReuse/ActiveRecord
2021-03-08 18:12:59 +05:30
def show_adoption?
false
end
2021-04-29 21:17:54 +05:30
def should_track_devops_score?
true
end
2022-08-27 11:52:29 +05:30
def tracking_namespace_source
nil
end
def tracking_project_source
nil
end
2020-11-24 15:15:51 +05:30
end
2021-03-08 18:12:59 +05:30
2021-06-08 01:23:25 +05:30
Admin::DevOpsReportController.prepend_mod_with('Admin::DevOpsReportController')