index.html.haml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. - content_for :page_title do
  2. = t('admin.dashboard.title')
  3. .dashboard__counters
  4. %div
  5. = link_to admin_accounts_url(local: 1, recent: 1) do
  6. .dashboard__counters__num= number_with_delimiter @users_count
  7. .dashboard__counters__label= t 'admin.dashboard.total_users'
  8. %div
  9. %div
  10. .dashboard__counters__num= number_with_delimiter @registrations_week
  11. .dashboard__counters__label= t 'admin.dashboard.week_users_new'
  12. %div
  13. %div
  14. .dashboard__counters__num= number_with_delimiter @logins_week
  15. .dashboard__counters__label= t 'admin.dashboard.week_users_active'
  16. %div
  17. %div
  18. .dashboard__counters__num= number_with_delimiter @interactions_week
  19. .dashboard__counters__label= t 'admin.dashboard.week_interactions'
  20. %div
  21. = link_to admin_reports_url do
  22. .dashboard__counters__num= number_with_delimiter @reports_count
  23. .dashboard__counters__label= t 'admin.dashboard.open_reports'
  24. %div
  25. = link_to sidekiq_url do
  26. .dashboard__counters__num= number_with_delimiter @queue_backlog
  27. .dashboard__counters__label= t 'admin.dashboard.backlog'
  28. .dashboard__widgets
  29. .dashboard__widgets__users
  30. %div
  31. %h4= t 'admin.dashboard.recent_users'
  32. %ul
  33. - @recent_users.each do |user|
  34. %li= admin_account_link_to(user.account)
  35. .dashboard__widgets__features
  36. %div
  37. %h4= t 'admin.dashboard.features'
  38. %ul
  39. %li
  40. = feature_hint(link_to(t('admin.dashboard.feature_registrations'), edit_admin_settings_path), @registrations_enabled)
  41. %li
  42. = feature_hint(link_to(t('admin.dashboard.feature_invites'), edit_admin_settings_path), @invites_enabled)
  43. %li
  44. = feature_hint(link_to(t('admin.dashboard.feature_deletions'), edit_admin_settings_path), @deletions_enabled)
  45. %li
  46. = feature_hint(link_to(t('admin.dashboard.feature_profile_directory'), edit_admin_settings_path), @profile_directory)
  47. %li
  48. = feature_hint(link_to(t('admin.dashboard.feature_timeline_preview'), edit_admin_settings_path), @timeline_preview)
  49. %li
  50. = feature_hint(link_to(t('admin.dashboard.feature_relay'), admin_relays_path), @relay_enabled)
  51. .dashboard__widgets__versions
  52. %div
  53. %h4= t 'admin.dashboard.software'
  54. %ul
  55. %li
  56. Mastodon
  57. %span.pull-right= @version
  58. %li
  59. Ruby
  60. %span.pull-right= "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
  61. %li
  62. PostgreSQL
  63. %span.pull-right= @database_version
  64. %li
  65. Redis
  66. %span.pull-right= @redis_version
  67. .dashboard__widgets__space
  68. %div
  69. %h4= t 'admin.dashboard.space'
  70. %ul
  71. %li
  72. PostgreSQL
  73. %span.pull-right= number_to_human_size @database_size
  74. %li
  75. Redis
  76. %span.pull-right= number_to_human_size @redis_size
  77. .dashboard__widgets__config
  78. %div
  79. %h4= t 'admin.dashboard.config'
  80. %ul
  81. %li
  82. = feature_hint(t('admin.dashboard.search'), @search_enabled)
  83. %li
  84. = feature_hint(t('admin.dashboard.single_user_mode'), @single_user_mode)
  85. %li
  86. = feature_hint('LDAP', @ldap_enabled)
  87. %li
  88. = feature_hint('CAS', @cas_enabled)
  89. %li
  90. = feature_hint('SAML', @saml_enabled)
  91. %li
  92. = feature_hint('PAM', @pam_enabled)
  93. %li
  94. = feature_hint(t('admin.dashboard.hidden_service'), @hidden_service)
  95. .dashboard__widgets__trends
  96. %div
  97. %h4= t 'admin.dashboard.trends'
  98. %ul
  99. - @trending_hashtags.each do |tag|
  100. %li
  101. = link_to "##{tag.name}", web_url("timelines/tag/#{tag.name}")
  102. %span.pull-right= number_with_delimiter(tag.history[0][:accounts].to_i)