2018-07-16 01:11:53 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Admin
|
|
|
|
class DashboardController < BaseController
|
2022-04-28 17:47:34 +02:00
|
|
|
include Redisable
|
|
|
|
|
2018-07-16 01:11:53 +02:00
|
|
|
def index
|
2022-07-05 02:41:40 +02:00
|
|
|
authorize :dashboard, :index?
|
|
|
|
|
2024-09-06 18:52:35 +02:00
|
|
|
@pending_appeals_count = Appeal.pending.async_count
|
|
|
|
@pending_reports_count = Report.unresolved.async_count
|
|
|
|
@pending_tags_count = Tag.pending_review.async_count
|
|
|
|
@pending_users_count = User.pending.async_count
|
2022-07-05 02:41:40 +02:00
|
|
|
@system_checks = Admin::SystemCheck.perform(current_user)
|
2021-11-25 13:07:38 +01:00
|
|
|
@time_period = (29.days.ago.to_date...Time.now.utc.to_date)
|
2018-07-16 01:11:53 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|