dashboard_controller.rb 542 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. module Admin
  3. class DashboardController < BaseController
  4. include Redisable
  5. def index
  6. authorize :dashboard, :index?
  7. @system_checks = Admin::SystemCheck.perform(current_user)
  8. @time_period = (29.days.ago.to_date...Time.now.utc.to_date)
  9. @pending_users_count = User.pending.count
  10. @pending_reports_count = Report.unresolved.count
  11. @pending_tags_count = Tag.pending_review.count
  12. @pending_appeals_count = Appeal.pending.count
  13. end
  14. end
  15. end