2019-01-08 21:39:49 +09:00
|
|
|
- content_for :page_title do
|
|
|
|
= @instance.domain
|
|
|
|
|
2022-07-05 09:41:40 +09:00
|
|
|
- if current_user.can?(:view_dashboard)
|
|
|
|
- content_for :heading_actions do
|
|
|
|
= l(@time_period.first)
|
|
|
|
= ' - '
|
|
|
|
= l(@time_period.last)
|
|
|
|
|
2023-10-23 21:27:57 +09:00
|
|
|
- if @instance.persisted?
|
2024-10-01 17:36:41 +09:00
|
|
|
= render 'dashboard', instance_domain: @instance.domain, period_end_at: @time_period.last, period_start_at: @time_period.first
|
2023-10-23 21:27:57 +09:00
|
|
|
- else
|
|
|
|
%p
|
|
|
|
= t('admin.instances.unknown_instance')
|
2021-05-06 06:39:02 +09:00
|
|
|
|
2019-01-08 21:39:49 +09:00
|
|
|
%hr.spacer/
|
|
|
|
|
2022-03-09 16:52:32 +09:00
|
|
|
%h3= t('admin.instances.content_policies.title')
|
|
|
|
|
2023-08-03 02:32:48 +09:00
|
|
|
- if limited_federation_mode?
|
2022-03-09 16:52:32 +09:00
|
|
|
%p= t('admin.instances.content_policies.limited_federation_mode_description_html')
|
|
|
|
|
|
|
|
- if @instance.domain_allow
|
|
|
|
= link_to t('admin.domain_allows.undo'), admin_domain_allow_path(@instance.domain_allow), class: 'button button--destructive', data: { confirm: t('admin.accounts.are_you_sure'), method: :delete }
|
|
|
|
- else
|
|
|
|
= link_to t('admin.domain_allows.add_new'), admin_domain_allows_path(domain_allow: { domain: @instance.domain }), class: 'button', method: :post
|
|
|
|
- else
|
|
|
|
%p= t('admin.instances.content_policies.description_html')
|
|
|
|
|
|
|
|
- if @instance.domain_block
|
|
|
|
.table-wrapper
|
|
|
|
%table.table.horizontal-table
|
|
|
|
%tbody
|
|
|
|
%tr
|
|
|
|
%th= t('admin.instances.content_policies.comment')
|
|
|
|
%td= @instance.domain_block.private_comment
|
|
|
|
%tr
|
|
|
|
%th= t('admin.instances.content_policies.reason')
|
|
|
|
%td= @instance.domain_block.public_comment
|
|
|
|
%tr
|
|
|
|
%th= t('admin.instances.content_policies.policy')
|
2023-06-03 02:58:18 +09:00
|
|
|
%td= @instance.domain_block.policies.map { |policy| t(policy, scope: 'admin.instances.content_policies.policies') }.join(' · ')
|
2022-03-09 16:52:32 +09:00
|
|
|
|
|
|
|
= link_to t('admin.domain_blocks.edit'), edit_admin_domain_block_path(@instance.domain_block), class: 'button'
|
|
|
|
= link_to t('admin.domain_blocks.undo'), admin_domain_block_path(@instance.domain_block), class: 'button', data: { confirm: t('admin.accounts.are_you_sure'), method: :delete }
|
|
|
|
- else
|
|
|
|
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @instance.domain), class: 'button'
|
|
|
|
|
2023-10-23 21:27:57 +09:00
|
|
|
- if @instance.persisted?
|
|
|
|
%hr.spacer/
|
2022-03-09 16:52:32 +09:00
|
|
|
|
2024-07-23 17:12:30 +09:00
|
|
|
%h3= t('admin.instances.audit_log.title')
|
|
|
|
- if @action_logs.empty?
|
|
|
|
%p= t('accounts.nothing_here')
|
|
|
|
- else
|
|
|
|
.report-notes
|
|
|
|
= render partial: 'admin/action_logs/action_log', collection: @action_logs
|
|
|
|
= link_to t('admin.instances.audit_log.view_all'), admin_action_logs_path(target_domain: @instance.domain), class: 'button'
|
|
|
|
|
|
|
|
%hr.spacer/
|
|
|
|
|
2023-10-23 21:27:57 +09:00
|
|
|
%h3= t('admin.instances.availability.title')
|
2022-03-09 16:52:32 +09:00
|
|
|
|
2023-10-23 21:27:57 +09:00
|
|
|
%p
|
|
|
|
= t('admin.instances.availability.description_html', count: DeliveryFailureTracker::FAILURE_DAYS_THRESHOLD)
|
2022-03-09 16:52:32 +09:00
|
|
|
|
2023-10-23 21:27:57 +09:00
|
|
|
.availability-indicator
|
|
|
|
%ul.availability-indicator__graphic
|
|
|
|
- @instance.availability_over_days(14).each do |(date, failing)|
|
|
|
|
%li.availability-indicator__graphic__item{ class: failing ? 'negative' : 'neutral', title: l(date) }
|
|
|
|
.availability-indicator__hint
|
|
|
|
- if @instance.unavailable?
|
|
|
|
%span.negative-hint
|
|
|
|
= t('admin.instances.availability.failure_threshold_reached', date: l(@instance.unavailable_domain.created_at.to_date))
|
|
|
|
= link_to t('admin.instances.delivery.restart'), restart_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }
|
|
|
|
- elsif @instance.exhausted_deliveries_days.empty?
|
|
|
|
%span.positive-hint
|
|
|
|
= t('admin.instances.availability.no_failures_recorded')
|
|
|
|
= link_to t('admin.instances.delivery.stop'), stop_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }
|
|
|
|
- else
|
|
|
|
%span.negative-hint
|
|
|
|
= t('admin.instances.availability.failures_recorded', count: @instance.delivery_failure_tracker.days)
|
|
|
|
%span= link_to t('admin.instances.delivery.clear'), clear_delivery_errors_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post } unless @instance.exhausted_deliveries_days.empty?
|
|
|
|
%span= link_to t('admin.instances.delivery.stop'), stop_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }
|
2022-03-09 16:52:32 +09:00
|
|
|
|
2023-10-23 21:27:57 +09:00
|
|
|
- if @instance.purgeable?
|
|
|
|
%p= t('admin.instances.purge_description_html')
|
2022-03-09 16:52:32 +09:00
|
|
|
|
2023-10-23 21:27:57 +09:00
|
|
|
= link_to t('admin.instances.purge'), admin_instance_path(@instance), data: { confirm: t('admin.instances.confirm_purge'), method: :delete }, class: 'button button--destructive'
|