2018-04-18 15:30:41 -04:00
|
|
|
require 'disk_space'
|
2018-04-19 12:19:21 -04:00
|
|
|
|
2018-04-16 04:42:06 -04:00
|
|
|
class Admin::DashboardNextController < Admin::AdminController
|
2018-04-18 15:30:41 -04:00
|
|
|
def index
|
2018-05-13 22:01:44 -04:00
|
|
|
dashboard_data = AdminDashboardNextData.fetch_cached_stats
|
2018-05-13 23:07:59 -04:00
|
|
|
dashboard_data.merge!(version_check: DiscourseUpdates.check_version.as_json) if SiteSetting.version_checks?
|
2018-04-18 15:30:41 -04:00
|
|
|
dashboard_data[:disk_space] = DiskSpace.cached_stats
|
|
|
|
render json: dashboard_data
|
|
|
|
end
|
2018-04-16 04:42:06 -04:00
|
|
|
end
|