2018-04-19 03:30:41 +08:00
|
|
|
require 'disk_space'
|
2018-04-20 00:19:21 +08:00
|
|
|
|
2018-04-16 16:42:06 +08:00
|
|
|
class Admin::DashboardNextController < Admin::AdminController
|
2018-04-19 03:30:41 +08:00
|
|
|
def index
|
2018-05-14 10:01:44 +08:00
|
|
|
dashboard_data = AdminDashboardNextData.fetch_cached_stats
|
2018-05-14 11:07:59 +08:00
|
|
|
dashboard_data.merge!(version_check: DiscourseUpdates.check_version.as_json) if SiteSetting.version_checks?
|
2018-06-21 04:26:37 +08:00
|
|
|
dashboard_data[:disk_space] = DiskSpace.cached_stats if SiteSetting.enable_backups
|
2018-04-19 03:30:41 +08:00
|
|
|
render json: dashboard_data
|
|
|
|
end
|
2018-04-16 16:42:06 +08:00
|
|
|
end
|