1341830ed2
- Add total counts for accounts and identities alongside 7-day and 24-hour metrics - Change layout from horizontal to vertical stacking Co-Authored-By: Claude <noreply@anthropic.com>
21 lines
610 B
Ruby
21 lines
610 B
Ruby
class Admin::StatsController < AdminController
|
|
disallow_account_scope
|
|
|
|
layout "public"
|
|
|
|
def show
|
|
@accounts_total = Account.count
|
|
@accounts_last_7_days = Account.where(created_at: 7.days.ago..).count
|
|
@accounts_last_24_hours = Account.where(created_at: 24.hours.ago..).count
|
|
|
|
@identities_total = Identity.count
|
|
@identities_last_7_days = Identity.where(created_at: 7.days.ago..).count
|
|
@identities_last_24_hours = Identity.where(created_at: 24.hours.ago..).count
|
|
|
|
@top_accounts = Account
|
|
.where("cards_count > 0")
|
|
.order(cards_count: :desc)
|
|
.limit(20)
|
|
end
|
|
end
|