mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 06:03:44 +08:00
1a78e12f4e
- moderation tab - sorting/pagination - improved third party reports support - trending charts - better perf - many fixes - refactoring - new reports Co-Authored-By: Simon Cossar <scossar@users.noreply.github.com>
32 lines
448 B
Ruby
32 lines
448 B
Ruby
class AdminDashboardNextData
|
|
include StatsCacheable
|
|
|
|
def initialize(opts = {})
|
|
@opts = opts
|
|
end
|
|
|
|
def self.fetch_stats
|
|
self.class.new.as_json
|
|
end
|
|
|
|
def self.fetch_stats
|
|
new.as_json
|
|
end
|
|
|
|
def get_json
|
|
{}
|
|
end
|
|
|
|
def as_json(_options = nil)
|
|
@json ||= get_json
|
|
end
|
|
|
|
def self.reports(source)
|
|
source.map { |type| Report.find(type).as_json }
|
|
end
|
|
|
|
def self.stats_cache_key
|
|
'dashboard-next-data'
|
|
end
|
|
end
|