Class: DevOpsReport::Metric

Inherits:
ApplicationRecord show all
Includes:
Presentable
Defined in:
app/models/dev_ops_report/metric.rb

Constant Summary collapse

METRICS =
%w[leader_issues instance_issues percentage_issues leader_notes instance_notes
percentage_notes leader_milestones instance_milestones percentage_milestones
leader_boards instance_boards percentage_boards leader_merge_requests
instance_merge_requests percentage_merge_requests leader_ci_pipelines
instance_ci_pipelines percentage_ci_pipelines leader_environments instance_environments
percentage_environments leader_deployments instance_deployments percentage_deployments
leader_projects_prometheus_active instance_projects_prometheus_active
percentage_projects_prometheus_active leader_service_desk_issues instance_service_desk_issues
percentage_service_desk_issues].freeze

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Method Summary collapse

Methods included from Presentable

#present

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#instance_score(feature) ⇒ Object


23
24
25
# File 'app/models/dev_ops_report/metric.rb', line 23

def instance_score(feature)
  self["instance_#{feature}"]
end

#leader_score(feature) ⇒ Object


27
28
29
# File 'app/models/dev_ops_report/metric.rb', line 27

def leader_score(feature)
  self["leader_#{feature}"]
end

#percentage_score(feature) ⇒ Object


31
32
33
# File 'app/models/dev_ops_report/metric.rb', line 31

def percentage_score(feature)
  self["percentage_#{feature}"]
end