mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 19:18:07 +01:00
16 lines
562 B
Ruby
16 lines
562 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class Admin::Metrics::Measure
|
||
|
MEASURES = {
|
||
|
active_users: Admin::Metrics::Measure::ActiveUsersMeasure,
|
||
|
new_users: Admin::Metrics::Measure::NewUsersMeasure,
|
||
|
interactions: Admin::Metrics::Measure::InteractionsMeasure,
|
||
|
opened_reports: Admin::Metrics::Measure::OpenedReportsMeasure,
|
||
|
resolved_reports: Admin::Metrics::Measure::ResolvedReportsMeasure,
|
||
|
}.freeze
|
||
|
|
||
|
def self.retrieve(measure_keys, start_at, end_at)
|
||
|
Array(measure_keys).map { |key| MEASURES[key.to_sym]&.new(start_at, end_at) }.compact
|
||
|
end
|
||
|
end
|