index.html.haml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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_profile_directory'), edit_admin_settings_path
  59. - if @profile_directory
  60. %span.pull-right.positive-hint= fa_icon 'check fw'
  61. - else
  62. %span.pull-right.negative-hint= fa_icon 'times fw'
  63. %li
  64. = link_to t('admin.dashboard.feature_relay'), admin_relays_path
  65. - if @relay_enabled
  66. %span.pull-right.positive-hint= fa_icon 'check fw'
  67. - else
  68. %span.pull-right.negative-hint= fa_icon 'times fw'
  69. .dashboard__widgets__versions
  70. %div
  71. %h4= t 'admin.dashboard.software'
  72. %ul
  73. %li
  74. Mastodon
  75. %span.pull-right= @version
  76. %li
  77. Ruby
  78. %span.pull-right= "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
  79. %li
  80. PostgreSQL
  81. %span.pull-right= @database_version
  82. %li
  83. Redis
  84. %span.pull-right= @redis_version
  85. .dashboard__widgets__space
  86. %div
  87. %h4= t 'admin.dashboard.space'
  88. %ul
  89. %li
  90. PostgreSQL
  91. %span.pull-right= number_to_human_size @database_size
  92. %li
  93. Redis
  94. %span.pull-right= number_to_human_size @redis_size
  95. .dashboard__widgets__config
  96. %div
  97. %h4= t 'admin.dashboard.config'
  98. %ul
  99. %li
  100. = t('admin.dashboard.search')
  101. - if @search_enabled
  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. = t('admin.dashboard.single_user_mode')
  107. - if @single_user_mode
  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. LDAP
  113. - if @ldap_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. CAS
  119. - if @cas_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. SAML
  125. - if @saml_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. PAM
  131. - if @pam_enabled
  132. %span.pull-right.positive-hint= fa_icon 'check fw'
  133. - else
  134. %span.pull-right.negative-hint= fa_icon 'times fw'
  135. %li
  136. = t 'admin.dashboard.hidden_service'
  137. - if @hidden_service
  138. %span.pull-right.positive-hint= fa_icon 'check fw'
  139. - else
  140. %span.pull-right.negative-hint= fa_icon 'times fw'
  141. .dashboard__widgets__trends
  142. %div
  143. %h4= t 'admin.dashboard.trends'
  144. %ul
  145. - @trending_hashtags.each do |tag|
  146. %li
  147. = link_to "##{tag.name}", web_url("timelines/tag/#{tag.name}")
  148. %span.pull-right= number_with_delimiter(tag.history[0][:accounts].to_i)