|
|
@ -5,6 +5,7 @@ module Admin
|
|
|
|
class DashboardController < BaseController
|
|
|
|
class DashboardController < BaseController
|
|
|
|
def index
|
|
|
|
def index
|
|
|
|
@users_count = User.count
|
|
|
|
@users_count = User.count
|
|
|
|
|
|
|
|
@pending_users_count = User.pending.count
|
|
|
|
@registrations_week = Redis.current.get("activity:accounts:local:#{current_week}") || 0
|
|
|
|
@registrations_week = Redis.current.get("activity:accounts:local:#{current_week}") || 0
|
|
|
|
@logins_week = Redis.current.pfcount("activity:logins:#{current_week}")
|
|
|
|
@logins_week = Redis.current.pfcount("activity:logins:#{current_week}")
|
|
|
|
@interactions_week = Redis.current.get("activity:interactions:#{current_week}") || 0
|
|
|
|
@interactions_week = Redis.current.get("activity:interactions:#{current_week}") || 0
|
|
|
@ -19,7 +20,7 @@ module Admin
|
|
|
|
@redis_version = redis_info['redis_version']
|
|
|
|
@redis_version = redis_info['redis_version']
|
|
|
|
@reports_count = Report.unresolved.count
|
|
|
|
@reports_count = Report.unresolved.count
|
|
|
|
@queue_backlog = Sidekiq::Stats.new.enqueued
|
|
|
|
@queue_backlog = Sidekiq::Stats.new.enqueued
|
|
|
|
@recent_users = User.confirmed.recent.includes(:account).limit(4)
|
|
|
|
@recent_users = User.confirmed.recent.includes(:account).limit(8)
|
|
|
|
@database_size = ActiveRecord::Base.connection.execute('SELECT pg_database_size(current_database())').first['pg_database_size']
|
|
|
|
@database_size = ActiveRecord::Base.connection.execute('SELECT pg_database_size(current_database())').first['pg_database_size']
|
|
|
|
@redis_size = redis_info['used_memory']
|
|
|
|
@redis_size = redis_info['used_memory']
|
|
|
|
@ldap_enabled = ENV['LDAP_ENABLED'] == 'true'
|
|
|
|
@ldap_enabled = ENV['LDAP_ENABLED'] == 'true'
|
|
|
@ -28,6 +29,7 @@ module Admin
|
|
|
|
@pam_enabled = ENV['PAM_ENABLED'] == 'true'
|
|
|
|
@pam_enabled = ENV['PAM_ENABLED'] == 'true'
|
|
|
|
@hidden_service = ENV['ALLOW_ACCESS_TO_HIDDEN_SERVICE'] == 'true'
|
|
|
|
@hidden_service = ENV['ALLOW_ACCESS_TO_HIDDEN_SERVICE'] == 'true'
|
|
|
|
@trending_hashtags = TrendingTags.get(10, filtered: false)
|
|
|
|
@trending_hashtags = TrendingTags.get(10, filtered: false)
|
|
|
|
|
|
|
|
@pending_tags_count = Tag.pending_review.count
|
|
|
|
@authorized_fetch = authorized_fetch_mode?
|
|
|
|
@authorized_fetch = authorized_fetch_mode?
|
|
|
|
@whitelist_enabled = whitelist_mode?
|
|
|
|
@whitelist_enabled = whitelist_mode?
|
|
|
|
@profile_directory = Setting.profile_directory
|
|
|
|
@profile_directory = Setting.profile_directory
|
|
|
|