index.html.haml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. - content_for :header_tags do
  2. = javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous'
  3. - content_for :page_title do
  4. = t('admin.dashboard.title')
  5. - content_for :heading_actions do
  6. = l(@time_period.first)
  7. = ' - '
  8. = l(@time_period.last)
  9. - unless @system_checks.empty?
  10. .flash-message-stack
  11. - @system_checks.each do |message|
  12. .flash-message{ class: message.critical ? 'alert' : 'warning' }
  13. = t("admin.system_checks.#{message.key}.message_html", value: message.value ? content_tag(:strong, message.value) : nil)
  14. - if message.action
  15. = link_to t("admin.system_checks.#{message.key}.action"), message.action
  16. .dashboard
  17. .dashboard__item
  18. = react_admin_component :counter, measure: 'new_users', start_at: @time_period.first, end_at: @time_period.last, label: t('admin.dashboard.new_users'), href: admin_accounts_path(origin: 'local')
  19. .dashboard__item
  20. = react_admin_component :counter, measure: 'active_users', start_at: @time_period.first, end_at: @time_period.last, label: t('admin.dashboard.active_users'), href: admin_accounts_path(origin: 'local')
  21. .dashboard__item
  22. = react_admin_component :counter, measure: 'interactions', start_at: @time_period.first, end_at: @time_period.last, label: t('admin.dashboard.interactions')
  23. .dashboard__item
  24. = react_admin_component :counter, measure: 'opened_reports', start_at: @time_period.first, end_at: @time_period.last, label: t('admin.dashboard.opened_reports'), href: admin_reports_path
  25. .dashboard__item
  26. = react_admin_component :counter, measure: 'resolved_reports', start_at: @time_period.first, end_at: @time_period.last, label: t('admin.dashboard.resolved_reports'), href: admin_reports_path(resolved: '1')
  27. .dashboard__item
  28. = link_to admin_reports_path, class: 'dashboard__quick-access' do
  29. %span= t('admin.dashboard.pending_reports_html', count: @pending_reports_count)
  30. = fa_icon 'chevron-right fw'
  31. = link_to admin_accounts_path(status: 'pending'), class: 'dashboard__quick-access' do
  32. %span= t('admin.dashboard.pending_users_html', count: @pending_users_count)
  33. = fa_icon 'chevron-right fw'
  34. = link_to admin_trends_tags_path(status: 'pending_review'), class: 'dashboard__quick-access' do
  35. %span= t('admin.dashboard.pending_tags_html', count: @pending_tags_count)
  36. = fa_icon 'chevron-right fw'
  37. = link_to admin_disputes_appeals_path(status: 'pending'), class: 'dashboard__quick-access' do
  38. %span= t('admin.dashboard.pending_appeals_html', count: @pending_appeals_count)
  39. = fa_icon 'chevron-right fw'
  40. .dashboard__item
  41. = react_admin_component :dimension, dimension: 'sources', start_at: @time_period.first, end_at: @time_period.last, limit: 8, label: t('admin.dashboard.sources')
  42. .dashboard__item
  43. = react_admin_component :dimension, dimension: 'languages', start_at: @time_period.first, end_at: @time_period.last, limit: 8, label: t('admin.dashboard.top_languages')
  44. .dashboard__item
  45. = react_admin_component :dimension, dimension: 'servers', start_at: @time_period.first, end_at: @time_period.last, limit: 8, label: t('admin.dashboard.top_servers')
  46. .dashboard__item.dashboard__item--span-double-column
  47. = react_admin_component :retention, start_at: @time_period.last - 6.months, end_at: @time_period.last, frequency: 'month'
  48. .dashboard__item.dashboard__item--span-double-row
  49. = react_admin_component :trends, limit: 7
  50. .dashboard__item
  51. = react_admin_component :dimension, dimension: 'software_versions', start_at: @time_period.first, end_at: @time_period.last, limit: 4, label: t('admin.dashboard.software')
  52. .dashboard__item
  53. = react_admin_component :dimension, dimension: 'space_usage', start_at: @time_period.first, end_at: @time_period.last, limit: 3, label: t('admin.dashboard.space')