pyfedi/app/templates/admin/instances.html

83 lines
3.7 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 09:36:19 +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> |
<a href="{{ url_for('admin.admin_instances', filter='trusted') }}">Trusted</a>
2024-09-04 19:45:44 -04:00
<table class="table table-striped">
<tr>
<th>Domain</th>
<th>Software</th>
<th>Version</th>
2024-09-24 09:36:19 +12:00
<th title="{{ _('Known Communities') }}">Communities</th>
<th title="{{ _('Known Users') }}">Users</th>
2024-09-04 19:45:44 -04:00
<th>Posts</th>
<th>Post Replies</th>
<th>Vote Weight</th>
2024-09-24 09:36:19 +12:00
<th>Trusted</th>
2024-09-04 19:45:44 -04:00
<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>
</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 09:36:19 +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 %}
<td>Gone Forever</td>
{% elif instance.dormant %}
<td>Dormant</td>
{% else %}
<td>Online</td>
{% endif %}
</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 %}