2018-07-15 19:11:53 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Admin
|
|
|
|
class DashboardController < BaseController
|
2022-04-28 11:47:34 -04:00
|
|
|
include Redisable
|
|
|
|
|
2018-07-15 19:11:53 -04:00
|
|
|
def index
|
2022-07-04 20:41:40 -04:00
|
|
|
authorize :dashboard, :index?
|
|
|
|
|
|
|
|
@system_checks = Admin::SystemCheck.perform(current_user)
|
2021-11-25 07:07:38 -05:00
|
|
|
@time_period = (29.days.ago.to_date...Time.now.utc.to_date)
|
2019-08-07 10:13:34 -04:00
|
|
|
@pending_users_count = User.pending.count
|
2021-10-14 14:44:59 -04:00
|
|
|
@pending_reports_count = Report.unresolved.count
|
2019-08-07 10:13:34 -04:00
|
|
|
@pending_tags_count = Tag.pending_review.count
|
2022-02-14 15:27:53 -05:00
|
|
|
@pending_appeals_count = Appeal.pending.count
|
2018-07-15 19:11:53 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|