index.html.haml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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{ title: number_with_delimiter(@users_count, strip_insignificant_zeros: true) }
  7. = number_to_human @users_count, strip_insignificant_zeros: true
  8. .dashboard__counters__label= t 'admin.dashboard.total_users'
  9. %div
  10. %div
  11. .dashboard__counters__num{ title: number_with_delimiter(@registrations_week, strip_insignificant_zeros: true) }
  12. = number_to_human @registrations_week, strip_insignificant_zeros: true
  13. .dashboard__counters__label= t 'admin.dashboard.week_users_new'
  14. %div
  15. %div
  16. .dashboard__counters__num{ title: number_with_delimiter(@logins_week, strip_insignificant_zeros: true) }
  17. = number_to_human @logins_week, strip_insignificant_zeros: true
  18. .dashboard__counters__label= t 'admin.dashboard.week_users_active'
  19. %div
  20. = link_to admin_pending_accounts_path do
  21. .dashboard__counters__num{ title: number_with_delimiter(@pending_users_count, strip_insignificant_zeros: true) }
  22. = number_to_human @pending_users_count, strip_insignificant_zeros: true
  23. .dashboard__counters__label= t 'admin.dashboard.pending_users'
  24. %div
  25. = link_to admin_reports_url do
  26. .dashboard__counters__num{ title: number_with_delimiter(@reports_count, strip_insignificant_zeros: true) }
  27. = number_to_human @reports_count, strip_insignificant_zeros: true
  28. .dashboard__counters__label= t 'admin.dashboard.open_reports'
  29. %div
  30. = link_to admin_tags_path(pending_review: '1') do
  31. .dashboard__counters__num{ title: number_with_delimiter(@pending_tags_count, strip_insignificant_zeros: true) }
  32. = number_to_human @pending_tags_count, strip_insignificant_zeros: true
  33. .dashboard__counters__label= t 'admin.dashboard.pending_tags'
  34. %div
  35. %div
  36. .dashboard__counters__num{ title: number_with_delimiter(@interactions_week, strip_insignificant_zeros: true) }
  37. = number_to_human @interactions_week, strip_insignificant_zeros: true
  38. .dashboard__counters__label= t 'admin.dashboard.week_interactions'
  39. %div
  40. = link_to sidekiq_url do
  41. .dashboard__counters__num{ title: number_with_delimiter(@queue_backlog, strip_insignificant_zeros: true) }
  42. = number_to_human @queue_backlog, strip_insignificant_zeros: true
  43. .dashboard__counters__label= t 'admin.dashboard.backlog'
  44. .dashboard__widgets
  45. .dashboard__widgets__users
  46. %div
  47. %h4= t 'admin.dashboard.recent_users'
  48. %ul
  49. - @recent_users.each do |user|
  50. %li= admin_account_link_to(user.account)
  51. .dashboard__widgets__features
  52. %div
  53. %h4= t 'admin.dashboard.features'
  54. %ul
  55. %li
  56. = feature_hint(link_to(t('admin.dashboard.feature_registrations'), edit_admin_settings_path), @registrations_enabled)
  57. %li
  58. = feature_hint(link_to(t('admin.dashboard.feature_invites'), edit_admin_settings_path), @invites_enabled)
  59. %li
  60. = feature_hint(link_to(t('admin.dashboard.feature_deletions'), edit_admin_settings_path), @deletions_enabled)
  61. %li
  62. = feature_hint(link_to(t('admin.dashboard.feature_profile_directory'), edit_admin_settings_path), @profile_directory)
  63. %li
  64. = feature_hint(link_to(t('admin.dashboard.feature_timeline_preview'), edit_admin_settings_path), @timeline_preview)
  65. %li
  66. = feature_hint(link_to(t('admin.dashboard.trends'), edit_admin_settings_path), @trends_enabled)
  67. %li
  68. = feature_hint(link_to(t('admin.dashboard.feature_relay'), admin_relays_path), @relay_enabled)
  69. %li
  70. = feature_hint(link_to(t('admin.dashboard.feature_spam_check'), edit_admin_settings_path), @spam_check_enabled)
  71. .dashboard__widgets__versions
  72. %div
  73. %h4= t 'admin.dashboard.software'
  74. %ul
  75. %li
  76. Mastodon
  77. %span.pull-right= @version
  78. %li
  79. Ruby
  80. %span.pull-right= "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
  81. %li
  82. PostgreSQL
  83. %span.pull-right= @database_version
  84. %li
  85. Redis
  86. %span.pull-right= @redis_version
  87. .dashboard__widgets__space
  88. %div
  89. %h4= t 'admin.dashboard.space'
  90. %ul
  91. %li
  92. PostgreSQL
  93. %span.pull-right= number_to_human_size @database_size
  94. %li
  95. Redis
  96. %span.pull-right= number_to_human_size @redis_size
  97. .dashboard__widgets__config
  98. %div
  99. %h4= t 'admin.dashboard.config'
  100. %ul
  101. %li
  102. = feature_hint(t('admin.dashboard.search'), @search_enabled)
  103. %li
  104. = feature_hint(t('admin.dashboard.single_user_mode'), @single_user_mode)
  105. %li
  106. = feature_hint(t('admin.dashboard.authorized_fetch_mode'), @authorized_fetch)
  107. %li
  108. = feature_hint(t('admin.dashboard.whitelist_mode'), @whitelist_enabled)
  109. %li
  110. = feature_hint('LDAP', @ldap_enabled)
  111. %li
  112. = feature_hint('CAS', @cas_enabled)
  113. %li
  114. = feature_hint('SAML', @saml_enabled)
  115. %li
  116. = feature_hint('PAM', @pam_enabled)
  117. %li
  118. = feature_hint(t('admin.dashboard.hidden_service'), @hidden_service)
  119. .dashboard__widgets__trends
  120. %div
  121. %h4= t 'admin.dashboard.trends'
  122. %ul
  123. - @trending_hashtags.each do |tag|
  124. %li
  125. = link_to content_tag(:span, "##{tag.name}", class: !tag.trendable? && !tag.reviewed? ? 'warning-hint' : (!tag.trendable? ? 'negative-hint' : nil)), admin_tag_path(tag.id)
  126. %span.pull-right= number_with_delimiter(tag.history[0][:accounts].to_i)