_dashboard.html.haml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. -# locals: (instance_domain:, period_end_at:, period_start_at:)
  2. %p
  3. = material_symbol 'info'
  4. = t('admin.instances.totals_time_period_hint_html')
  5. .dashboard
  6. .dashboard__item
  7. = react_admin_component :counter,
  8. end_at: period_end_at,
  9. href: current_user.can?(:manage_users) ? admin_accounts_path(origin: 'remote', by_domain: instance_domain) : nil,
  10. label: t('admin.instances.dashboard.instance_accounts_measure'),
  11. measure: 'instance_accounts',
  12. params: { domain: instance_domain },
  13. start_at: period_start_at
  14. .dashboard__item
  15. = react_admin_component :counter,
  16. end_at: period_end_at,
  17. label: t('admin.instances.dashboard.instance_statuses_measure'),
  18. measure: 'instance_statuses',
  19. params: { domain: instance_domain },
  20. start_at: period_start_at
  21. .dashboard__item
  22. = react_admin_component :counter,
  23. end_at: period_end_at,
  24. label: t('admin.instances.dashboard.instance_media_attachments_measure'),
  25. measure: 'instance_media_attachments',
  26. params: { domain: instance_domain },
  27. start_at: period_start_at
  28. .dashboard__item
  29. = react_admin_component :counter,
  30. end_at: period_end_at,
  31. label: t('admin.instances.dashboard.instance_follows_measure'),
  32. measure: 'instance_follows',
  33. params: { domain: instance_domain },
  34. start_at: period_start_at
  35. .dashboard__item
  36. = react_admin_component :counter,
  37. end_at: period_end_at,
  38. label: t('admin.instances.dashboard.instance_followers_measure'),
  39. measure: 'instance_followers',
  40. params: { domain: instance_domain },
  41. start_at: period_start_at
  42. .dashboard__item
  43. = react_admin_component :counter,
  44. end_at: period_end_at,
  45. href: current_user.can?(:manage_reports) ? admin_reports_path(by_target_domain: instance_domain) : nil,
  46. label: t('admin.instances.dashboard.instance_reports_measure'),
  47. measure: 'instance_reports',
  48. params: { domain: instance_domain },
  49. start_at: period_start_at
  50. .dashboard__item
  51. = react_admin_component :dimension,
  52. dimension: 'instance_accounts',
  53. end_at: period_end_at,
  54. label: t('admin.instances.dashboard.instance_accounts_dimension'),
  55. limit: 8,
  56. params: { domain: instance_domain },
  57. start_at: period_start_at
  58. .dashboard__item
  59. = react_admin_component :dimension,
  60. dimension: 'instance_languages',
  61. end_at: period_end_at,
  62. label: t('admin.instances.dashboard.instance_languages_dimension'),
  63. limit: 8,
  64. params: { domain: instance_domain },
  65. start_at: period_start_at