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
|
2021-04-02 12:09:15 +00:00
|
|
|
include RedisTracking
|
2020-06-22 15:09:27 +00:00
|
|
|
|
2021-01-18 12:10:41 +00:00
|
|
|
helper_method :show_adoption?
|
|
|
|
|
2021-04-02 12:09:15 +00:00
|
|
|
track_redis_hll_event :show, name: 'i_analytics_dev_ops_score', if: -> { should_track_devops_score? }
|
2020-06-22 15:09:27 +00:00
|
|
|
|
2020-10-05 21:08:47 +00:00
|
|
|
feature_category :devops_reports
|
|
|
|
|
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
|
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')
|