2018-07-19 14:33:11 -04:00
|
|
|
class AdminDashboardNextGeneralData < AdminDashboardNextData
|
|
|
|
def reports
|
|
|
|
@reports ||= %w{
|
|
|
|
users_by_type
|
|
|
|
users_by_trust_level
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def get_json
|
|
|
|
{
|
2018-08-01 09:45:50 -04:00
|
|
|
reports: self.class.reports(reports).compact,
|
2018-07-19 14:33:11 -04:00
|
|
|
updated_at: Time.zone.now.as_json
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.stats_cache_key
|
2018-07-31 17:35:13 -04:00
|
|
|
"general-dashboard-data-#{Report::SCHEMA_VERSION}"
|
2018-07-19 14:33:11 -04:00
|
|
|
end
|
|
|
|
end
|