mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FEATURE: Improve backup stats on admin dashboard
* Dashboard doesn't timeout anymore when Amazon S3 is used for backups * Storage stats are now a proper report with the same caching rules * Changing the backup_location, s3_backup_bucket or creating and deleting backups removes the report from the cache * It shows the number of backups and the backup location * It shows the used space for the correct backup location instead of always showing used space on local storage * It shows the date of the last backup as relative date
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
require 'disk_space'
|
||||
class Admin::DashboardController < Admin::AdminController
|
||||
def index
|
||||
dashboard_data = AdminDashboardData.fetch_cached_stats || Jobs::DashboardStats.new.execute({})
|
||||
dashboard_data.merge!(version_check: DiscourseUpdates.check_version.as_json) if SiteSetting.version_checks?
|
||||
dashboard_data[:disk_space] = DiskSpace.cached_stats
|
||||
render json: dashboard_data
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user