2018-07-16 09:11:53 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Admin
|
|
|
|
class DashboardController < BaseController
|
|
|
|
def index
|
2021-04-03 23:12:30 +11:00
|
|
|
@system_checks = Admin::SystemCheck.perform
|
2021-10-15 05:44:59 +11:00
|
|
|
@time_period = (1.month.ago.to_date...Time.now.utc.to_date)
|
2019-08-08 00:13:34 +10:00
|
|
|
@pending_users_count = User.pending.count
|
2021-10-15 05:44:59 +11:00
|
|
|
@pending_reports_count = Report.unresolved.count
|
2019-08-08 00:13:34 +10:00
|
|
|
@pending_tags_count = Tag.pending_review.count
|
2018-07-16 09:11:53 +10:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def redis_info
|
2019-08-07 03:40:06 +10:00
|
|
|
@redis_info ||= begin
|
|
|
|
if Redis.current.is_a?(Redis::Namespace)
|
|
|
|
Redis.current.redis.info
|
|
|
|
else
|
|
|
|
Redis.current.info
|
|
|
|
end
|
|
|
|
end
|
2018-07-16 09:11:53 +10:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|