index.html.haml 3.6 KB

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