The code powering m.abunchtell.com https://m.abunchtell.com
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.
 
 
 
 

112 lines
3.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. = 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. %li
  52. = feature_hint(link_to(t('admin.dashboard.feature_spam_check'), edit_admin_settings_path), @spam_check_enabled)
  53. .dashboard__widgets__versions
  54. %div
  55. %h4= t 'admin.dashboard.software'
  56. %ul
  57. %li
  58. Mastodon
  59. %span.pull-right= @version
  60. %li
  61. Ruby
  62. %span.pull-right= "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
  63. %li
  64. PostgreSQL
  65. %span.pull-right= @database_version
  66. %li
  67. Redis
  68. %span.pull-right= @redis_version
  69. .dashboard__widgets__space
  70. %div
  71. %h4= t 'admin.dashboard.space'
  72. %ul
  73. %li
  74. PostgreSQL
  75. %span.pull-right= number_to_human_size @database_size
  76. %li
  77. Redis
  78. %span.pull-right= number_to_human_size @redis_size
  79. .dashboard__widgets__config
  80. %div
  81. %h4= t 'admin.dashboard.config'
  82. %ul
  83. %li
  84. = feature_hint(t('admin.dashboard.search'), @search_enabled)
  85. %li
  86. = feature_hint(t('admin.dashboard.single_user_mode'), @single_user_mode)
  87. %li
  88. = feature_hint('LDAP', @ldap_enabled)
  89. %li
  90. = feature_hint('CAS', @cas_enabled)
  91. %li
  92. = feature_hint('SAML', @saml_enabled)
  93. %li
  94. = feature_hint('PAM', @pam_enabled)
  95. %li
  96. = feature_hint(t('admin.dashboard.hidden_service'), @hidden_service)
  97. .dashboard__widgets__trends
  98. %div
  99. %h4= t 'admin.dashboard.trends'
  100. %ul
  101. - @trending_hashtags.each do |tag|
  102. %li
  103. = link_to content_tag(:span, "##{tag.name}", class: !tag.trendable? && !tag.reviewed? ? 'warning-hint' : (!tag.trendable? ? 'negative-hint' : nil)), admin_tag_path(tag.id)
  104. %span.pull-right= number_with_delimiter(tag.history[0][:accounts].to_i)