counts.rb 380 B

123456789101112131415
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class SystemReport::Plugin::Entities::Counts < SystemReport::Plugin
  3. DESCRIPTION = __('Entity counts of database objects (e.g. ticket count, user count, etc.)').freeze
  4. def fetch
  5. counts = {}
  6. Models.all.each_key do |model|
  7. counts[model.to_s] = model.count
  8. end
  9. counts
  10. end
  11. end