This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/models/admin_dashboard_next_general_data.rb
2018-07-19 19:30:13 -04:00

34 lines
635 B
Ruby

class AdminDashboardNextGeneralData < AdminDashboardNextData
def reports
@reports ||= %w{
signups
topics
posts
dau_by_mau
daily_engaged_users
new_contributors
page_view_total_reqs
visits
time_to_first_response
likes
flags
user_to_user_private_messages_with_replies
top_referred_topics
users_by_type
users_by_trust_level
trending_search
}
end
def get_json
{
reports: self.class.reports(reports),
updated_at: Time.zone.now.as_json
}
end
def self.stats_cache_key
'general-dashboard-data'
end
end