2018-07-15 16:11:53 -07:00
|
|
|
- content_for :page_title do
|
|
|
|
= t('admin.dashboard.title')
|
|
|
|
|
2021-04-03 05:12:30 -07:00
|
|
|
- unless @system_checks.empty?
|
|
|
|
.flash-message-stack
|
|
|
|
- @system_checks.each do |message|
|
|
|
|
.flash-message.warning
|
2021-05-06 05:22:54 -07:00
|
|
|
= t("admin.system_checks.#{message.key}.message_html", value: message.value ? content_tag(:strong, message.value) : nil)
|
2021-04-03 05:12:30 -07:00
|
|
|
- if message.action
|
|
|
|
= link_to t("admin.system_checks.#{message.key}.action"), message.action
|
|
|
|
|
2018-07-15 16:11:53 -07:00
|
|
|
.dashboard__counters
|
|
|
|
%div
|
|
|
|
= link_to admin_accounts_url(local: 1, recent: 1) do
|
2019-09-21 17:37:15 -07:00
|
|
|
.dashboard__counters__num{ title: number_with_delimiter(@users_count, strip_insignificant_zeros: true) }
|
2021-07-07 12:13:08 -07:00
|
|
|
= friendly_number_to_human @users_count
|
2018-07-15 16:11:53 -07:00
|
|
|
.dashboard__counters__label= t 'admin.dashboard.total_users'
|
|
|
|
%div
|
|
|
|
%div
|
2019-09-21 17:37:15 -07:00
|
|
|
.dashboard__counters__num{ title: number_with_delimiter(@registrations_week, strip_insignificant_zeros: true) }
|
2021-07-07 12:13:08 -07:00
|
|
|
= friendly_number_to_human @registrations_week
|
2018-07-15 16:11:53 -07:00
|
|
|
.dashboard__counters__label= t 'admin.dashboard.week_users_new'
|
|
|
|
%div
|
|
|
|
%div
|
2019-09-21 17:37:15 -07:00
|
|
|
.dashboard__counters__num{ title: number_with_delimiter(@logins_week, strip_insignificant_zeros: true) }
|
2021-07-07 12:13:08 -07:00
|
|
|
= friendly_number_to_human @logins_week
|
2018-07-15 16:11:53 -07:00
|
|
|
.dashboard__counters__label= t 'admin.dashboard.week_users_active'
|
|
|
|
%div
|
2019-08-07 07:13:34 -07:00
|
|
|
= link_to admin_pending_accounts_path do
|
2019-09-21 17:37:15 -07:00
|
|
|
.dashboard__counters__num{ title: number_with_delimiter(@pending_users_count, strip_insignificant_zeros: true) }
|
2021-07-07 12:13:08 -07:00
|
|
|
= friendly_number_to_human @pending_users_count
|
2019-08-07 07:13:34 -07:00
|
|
|
.dashboard__counters__label= t 'admin.dashboard.pending_users'
|
2018-07-15 16:11:53 -07:00
|
|
|
%div
|
|
|
|
= link_to admin_reports_url do
|
2019-09-21 17:37:15 -07:00
|
|
|
.dashboard__counters__num{ title: number_with_delimiter(@reports_count, strip_insignificant_zeros: true) }
|
2021-07-07 12:13:08 -07:00
|
|
|
= friendly_number_to_human @reports_count
|
2018-07-15 16:11:53 -07:00
|
|
|
.dashboard__counters__label= t 'admin.dashboard.open_reports'
|
2019-08-07 07:13:34 -07:00
|
|
|
%div
|
2019-09-17 07:59:16 -07:00
|
|
|
= link_to admin_tags_path(pending_review: '1') do
|
2019-09-21 17:37:15 -07:00
|
|
|
.dashboard__counters__num{ title: number_with_delimiter(@pending_tags_count, strip_insignificant_zeros: true) }
|
2021-07-07 12:13:08 -07:00
|
|
|
= friendly_number_to_human @pending_tags_count
|
2019-08-07 07:13:34 -07:00
|
|
|
.dashboard__counters__label= t 'admin.dashboard.pending_tags'
|
|
|
|
%div
|
|
|
|
%div
|
2019-09-21 17:37:15 -07:00
|
|
|
.dashboard__counters__num{ title: number_with_delimiter(@interactions_week, strip_insignificant_zeros: true) }
|
2021-07-07 12:13:08 -07:00
|
|
|
= friendly_number_to_human @interactions_week
|
2019-08-07 07:13:34 -07:00
|
|
|
.dashboard__counters__label= t 'admin.dashboard.week_interactions'
|
2018-07-15 16:11:53 -07:00
|
|
|
%div
|
|
|
|
= link_to sidekiq_url do
|
2019-09-21 17:37:15 -07:00
|
|
|
.dashboard__counters__num{ title: number_with_delimiter(@queue_backlog, strip_insignificant_zeros: true) }
|
2021-07-07 12:13:08 -07:00
|
|
|
= friendly_number_to_human @queue_backlog
|
2018-07-15 16:11:53 -07:00
|
|
|
.dashboard__counters__label= t 'admin.dashboard.backlog'
|
|
|
|
|
|
|
|
.dashboard__widgets
|
|
|
|
.dashboard__widgets__users
|
|
|
|
%div
|
|
|
|
%h4= t 'admin.dashboard.recent_users'
|
|
|
|
%ul
|
|
|
|
- @recent_users.each do |user|
|
|
|
|
%li= admin_account_link_to(user.account)
|
|
|
|
|
|
|
|
.dashboard__widgets__features
|
|
|
|
%div
|
|
|
|
%h4= t 'admin.dashboard.features'
|
|
|
|
%ul
|
|
|
|
%li
|
2019-03-25 17:24:19 -07:00
|
|
|
= feature_hint(link_to(t('admin.dashboard.feature_registrations'), edit_admin_settings_path), @registrations_enabled)
|
|
|
|
%li
|
|
|
|
= feature_hint(link_to(t('admin.dashboard.feature_invites'), edit_admin_settings_path), @invites_enabled)
|
|
|
|
%li
|
|
|
|
= feature_hint(link_to(t('admin.dashboard.feature_deletions'), edit_admin_settings_path), @deletions_enabled)
|
|
|
|
%li
|
|
|
|
= feature_hint(link_to(t('admin.dashboard.feature_profile_directory'), edit_admin_settings_path), @profile_directory)
|
|
|
|
%li
|
|
|
|
= feature_hint(link_to(t('admin.dashboard.feature_timeline_preview'), edit_admin_settings_path), @timeline_preview)
|
2019-04-17 12:50:18 -07:00
|
|
|
%li
|
2019-04-18 15:47:23 -07:00
|
|
|
= feature_hint(link_to(t('admin.dashboard.keybase'), edit_admin_settings_path), @keybase_integration)
|
2019-08-06 10:40:06 -07:00
|
|
|
%li
|
|
|
|
= feature_hint(link_to(t('admin.dashboard.trends'), edit_admin_settings_path), @trends_enabled)
|
2019-03-25 17:24:19 -07:00
|
|
|
%li
|
|
|
|
= feature_hint(link_to(t('admin.dashboard.feature_relay'), admin_relays_path), @relay_enabled)
|
2018-07-15 16:11:53 -07:00
|
|
|
|
|
|
|
.dashboard__widgets__versions
|
|
|
|
%div
|
|
|
|
%h4= t 'admin.dashboard.software'
|
|
|
|
%ul
|
|
|
|
%li
|
|
|
|
Mastodon
|
|
|
|
%span.pull-right= @version
|
|
|
|
%li
|
|
|
|
Ruby
|
|
|
|
%span.pull-right= "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
|
|
|
|
%li
|
|
|
|
PostgreSQL
|
|
|
|
%span.pull-right= @database_version
|
|
|
|
%li
|
|
|
|
Redis
|
|
|
|
%span.pull-right= @redis_version
|
|
|
|
|
|
|
|
.dashboard__widgets__space
|
|
|
|
%div
|
|
|
|
%h4= t 'admin.dashboard.space'
|
|
|
|
%ul
|
|
|
|
%li
|
|
|
|
PostgreSQL
|
|
|
|
%span.pull-right= number_to_human_size @database_size
|
|
|
|
%li
|
|
|
|
Redis
|
|
|
|
%span.pull-right= number_to_human_size @redis_size
|
|
|
|
|
|
|
|
.dashboard__widgets__config
|
|
|
|
%div
|
|
|
|
%h4= t 'admin.dashboard.config'
|
|
|
|
%ul
|
|
|
|
%li
|
2019-03-25 17:24:19 -07:00
|
|
|
= feature_hint(t('admin.dashboard.search'), @search_enabled)
|
|
|
|
%li
|
|
|
|
= feature_hint(t('admin.dashboard.single_user_mode'), @single_user_mode)
|
2019-08-06 10:40:06 -07:00
|
|
|
%li
|
|
|
|
= feature_hint(t('admin.dashboard.authorized_fetch_mode'), @authorized_fetch)
|
|
|
|
%li
|
2019-08-21 03:35:40 -07:00
|
|
|
= feature_hint(t('admin.dashboard.whitelist_mode'), @whitelist_enabled)
|
2019-03-25 17:24:19 -07:00
|
|
|
%li
|
|
|
|
= feature_hint('LDAP', @ldap_enabled)
|
|
|
|
%li
|
|
|
|
= feature_hint('CAS', @cas_enabled)
|
|
|
|
%li
|
|
|
|
= feature_hint('SAML', @saml_enabled)
|
|
|
|
%li
|
|
|
|
= feature_hint('PAM', @pam_enabled)
|
|
|
|
%li
|
|
|
|
= feature_hint(t('admin.dashboard.hidden_service'), @hidden_service)
|
2018-07-16 10:21:27 -07:00
|
|
|
|
|
|
|
.dashboard__widgets__trends
|
|
|
|
%div
|
|
|
|
%h4= t 'admin.dashboard.trends'
|
|
|
|
%ul
|
|
|
|
- @trending_hashtags.each do |tag|
|
|
|
|
%li
|
2019-08-05 10:54:29 -07:00
|
|
|
= link_to content_tag(:span, "##{tag.name}", class: !tag.trendable? && !tag.reviewed? ? 'warning-hint' : (!tag.trendable? ? 'negative-hint' : nil)), admin_tag_path(tag.id)
|
2018-07-16 10:51:16 -07:00
|
|
|
%span.pull-right= number_with_delimiter(tag.history[0][:accounts].to_i)
|