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.

149 lines
4.9 KiB

  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. = link_to t('admin.dashboard.feature_registrations'), edit_admin_settings_path
  41. - if @registrations_enabled
  42. %span.pull-right.positive-hint= fa_icon 'check fw'
  43. - else
  44. %span.pull-right.negative-hint= fa_icon 'times fw'
  45. %li
  46. = link_to t('admin.dashboard.feature_invites'), edit_admin_settings_path
  47. - if @invites_enabled
  48. %span.pull-right.positive-hint= fa_icon 'check fw'
  49. - else
  50. %span.pull-right.negative-hint= fa_icon 'times fw'
  51. %li
  52. = link_to t('admin.dashboard.feature_deletions'), edit_admin_settings_path
  53. - if @deletions_enabled
  54. %span.pull-right.positive-hint= fa_icon 'check fw'
  55. - else
  56. %span.pull-right.negative-hint= fa_icon 'times fw'
  57. %li
  58. = link_to t('admin.dashboard.feature_relay'), admin_relays_path
  59. - if @relay_enabled
  60. %span.pull-right.positive-hint= fa_icon 'check fw'
  61. - else
  62. %span.pull-right.negative-hint= fa_icon 'times fw'
  63. .dashboard__widgets__versions
  64. %div
  65. %h4= t 'admin.dashboard.software'
  66. %ul
  67. %li
  68. Mastodon
  69. %span.pull-right= @version
  70. %li
  71. Ruby
  72. %span.pull-right= "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
  73. %li
  74. PostgreSQL
  75. %span.pull-right= @database_version
  76. %li
  77. Redis
  78. %span.pull-right= @redis_version
  79. .dashboard__widgets__space
  80. %div
  81. %h4= t 'admin.dashboard.space'
  82. %ul
  83. %li
  84. PostgreSQL
  85. %span.pull-right= number_to_human_size @database_size
  86. %li
  87. Redis
  88. %span.pull-right= number_to_human_size @redis_size
  89. .dashboard__widgets__config
  90. %div
  91. %h4= t 'admin.dashboard.config'
  92. %ul
  93. %li
  94. = t('admin.dashboard.search')
  95. - if @search_enabled
  96. %span.pull-right.positive-hint= fa_icon 'check fw'
  97. - else
  98. %span.pull-right.negative-hint= fa_icon 'times fw'
  99. %li
  100. = t('admin.dashboard.single_user_mode')
  101. - if @single_user_mode
  102. %span.pull-right.positive-hint= fa_icon 'check fw'
  103. - else
  104. %span.pull-right.negative-hint= fa_icon 'times fw'
  105. %li
  106. LDAP
  107. - if @ldap_enabled
  108. %span.pull-right.positive-hint= fa_icon 'check fw'
  109. - else
  110. %span.pull-right.negative-hint= fa_icon 'times fw'
  111. %li
  112. CAS
  113. - if @cas_enabled
  114. %span.pull-right.positive-hint= fa_icon 'check fw'
  115. - else
  116. %span.pull-right.negative-hint= fa_icon 'times fw'
  117. %li
  118. SAML
  119. - if @saml_enabled
  120. %span.pull-right.positive-hint= fa_icon 'check fw'
  121. - else
  122. %span.pull-right.negative-hint= fa_icon 'times fw'
  123. %li
  124. PAM
  125. - if @pam_enabled
  126. %span.pull-right.positive-hint= fa_icon 'check fw'
  127. - else
  128. %span.pull-right.negative-hint= fa_icon 'times fw'
  129. %li
  130. = t 'admin.dashboard.hidden_service'
  131. - if @hidden_service
  132. %span.pull-right.positive-hint= fa_icon 'check fw'
  133. - else
  134. %span.pull-right.negative-hint= fa_icon 'times fw'
  135. .dashboard__widgets__trends
  136. %div
  137. %h4= t 'admin.dashboard.trends'
  138. %ul
  139. - @trending_hashtags.each do |tag|
  140. %li
  141. = link_to "##{tag.name}", web_url("timelines/tag/#{tag.name}")
  142. %span.pull-right= number_with_delimiter(tag.history[0][:accounts].to_i)