You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
5.6 KiB

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