pyfedi/app/templates/admin/instances.html

86 lines
4.2 KiB
HTML
Raw Normal View History

2024-09-04 19:45:44 -04:00
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %}
{% from 'bootstrap/form.html' import render_form %}
{% set active_child = 'admin_instances' %}
{% block app_content %}
<div class="row">
<div class="col">
<h1>{{ title }}</h1>
<form method="get">
<input type="search" name="search"> <input type="submit" name="submit" value="Search">
</form>
2024-09-05 00:00:48 -04:00
Status Filter:
2024-09-24 11:33:49 +12:00
<a href="{{ url_for('admin.admin_instances', filter='online') }}">{{ _('Online') }}</a> |
<a href="{{ url_for('admin.admin_instances', filter='dormant') }}">{{ _('Dormant') }}</a> |
<a href="{{ url_for('admin.admin_instances', filter='gone_forever') }}">{{ _('Gone forever') }}</a> |
2024-12-27 20:20:16 +13:00
<a href="{{ url_for('admin.admin_instances', filter='trusted') }}">{{ _('Trusted') }}</a> |
<a href="{{ url_for('admin.admin_instances', filter='blocked') }}">{{ _('Blocked') }}</a>
2024-09-04 19:45:44 -04:00
<table class="table table-striped">
<tr>
2024-09-24 11:33:49 +12:00
<th>{{ _('Domain') }}</th>
<th>{{ _('Software') }}</th>
<th>{{ _('Version') }}</th>
<th title="{{ _('Known Communities') }}">{{ _('Communities') }}</th>
<th title="{{ _('Known Users') }}">{{ _('Users') }}</th>
<th>{{ _('Posts') }}</th>
<th>{{ _('Post Replies') }}</th>
<th>{{ _('Vote Weight') }}</th>
<th>{{ _('Trusted') }}</th>
<th title="{{ _('When an Activity was received from them') }}">{{ _('Seen') }}</th>
<th title="{{ _('When we successfully sent them an Activity') }}">{{ _('Sent') }}</th>
<th title="{{ _('How many times we failed to send (reset to 0 after every successful send)') }}">{{ _('Failed') }}</th>
<th title="{{ _('Instance Status - Online/Dormant/Gone Forever') }}">{{ _('Status') }}</th>
<th> </th>
2024-09-04 19:45:44 -04:00
</tr>
{% for instance in instances.items %}
<tr>
<td><a href="https://{{ instance.domain }}" rel="noopener nofollow noindex noreferrer">{{ instance.domain }}</a></td>
<td>{{ instance.software }}</td>
<td>{{ instance.version if instance.version }}</td>
2024-09-05 11:59:01 -04:00
<td>{{ instance.known_communities_count() }}</td>
2024-09-05 13:24:30 -04:00
<td>{{ instance.known_users_count() }}</td>
2024-09-05 11:59:01 -04:00
<td>{{ instance.post_count() }}</td>
<td>{{ instance.post_replies_count() }}</td>
2024-09-04 19:45:44 -04:00
<td>{{ instance.vote_weight }}</td>
2024-09-24 11:33:49 +12:00
<td>{{ _('Yes') if instance.trusted }}</td>
2024-09-04 19:45:44 -04:00
<td>{{ arrow.get(instance.last_seen).humanize(locale=locale) if instance.last_seen }}</td>
<td>{{ arrow.get(instance.last_successful_send).humanize(locale=locale) if instance.last_successful_send }}</td>
<td>{{ instance.failures }}</td>
{% if instance.gone_forever %}
2024-09-24 11:33:49 +12:00
<td>{{ _('Gone forever') }}</td>
2024-09-04 19:45:44 -04:00
{% elif instance.dormant %}
2024-09-24 11:33:49 +12:00
<td>{{ _('Dormant') }}</td>
2024-09-04 19:45:44 -04:00
{% else %}
2024-09-24 11:33:49 +12:00
<td>{{ _('Online') }}</td>
2024-09-04 19:45:44 -04:00
{% endif %}
2024-09-24 11:33:49 +12:00
<td><a href="{{ url_for('admin.admin_instance_edit', instance_id=instance.id) }}">{{ _('Edit') }}</a></td>
2024-09-04 19:45:44 -04:00
</tr>
{% endfor %}
</table>
<nav aria-label="Pagination" class="mt-4" role="navigation">
{% if prev_url %}
<a href="{{ prev_url }}" class="btn btn-primary">
<span aria-hidden="true">&larr;</span> {{ _('Previous page') }}
</a>
{% endif %}
{% if next_url %}
<a href="{{ next_url }}" class="btn btn-primary">
{{ _('Next page') }} <span aria-hidden="true">&rarr;</span>
</a>
{% endif %}
</nav>
</div>
</div>
<hr />
<div class="row">
<div class="col">
{% include 'admin/_nav.html' %}
</div>
</div>
<hr />
{% endblock %}