Files
wireguard_webadmin/templates/cluster/workers_list.html
2025-12-29 18:13:07 -03:00

80 lines
3.3 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% block content %}
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Status' %}</th>
<th>{% trans 'IP Address' %}</th>
<th><i class="fas fa-map-marker-alt" title="{% trans 'Location' %}"></i></th>
<th><i class="far fa-clock" title="{% trans 'Last Seen' %}"></i></th>
<th><i class="fas fa-cogs" title="{% trans 'Config Version' %}"></i></th>
<th><i class="far fa-edit"></i></th>
</tr>
</thead>
<tbody>
{% for worker in workers %}
<tr>
<td>{{ worker.name }}</td>
<td style="width: 1%; white-space: nowrap;">
{% if worker.enabled %}
<i class="fas fa-check text-green"></i>
{% else %}
<i class="fas fa-times text-gray"></i>
{% endif %}
</td>
<td>
{% if worker.ip_address %}
{{ worker.ip_address }}
{% if worker.ip_lock %}
<i class="fas fa-lock text-warning" title="{% trans 'IP Lock Enabled' %}"></i>
{% endif %}
{% else %}
<span class="text-muted">{% trans 'Not set' %}</span>
{% endif %}
</td>
<td>
{% if worker.country or worker.city %}
{% if worker.city %}{{ worker.city }}{% endif %}{% if worker.city and worker.country %}, {% endif %}{% if worker.country %}{{ worker.country }}{% endif %}
{% else %}
<span class="text-muted">{% trans 'Not set' %}</span>
{% endif %}
</td>
<td style="width: 1%; white-space: nowrap;">
{% if worker.workerstatus %}
{{ worker.workerstatus.last_seen|date:"M d, H:i" }}
{% else %}
<span class="text-muted">{% trans 'Never' %}</span>
{% endif %}
</td>
<td style="width: 1%; white-space: nowrap;">
{% if worker.workerstatus %}
{{ worker.workerstatus.config_version }}
{% if worker.workerstatus.config_pending %}
<i class="fas fa-clock text-warning" title="{% trans 'Config Pending' %}"></i>
{% endif %}
{% else %}
{% endif %}
</td>
<td style="width: 1%; white-space: nowrap;">
<i class="fas fa-sync-alt text-info" title="{% trans 'Force Reload' %}"></i>
<i class="fas fa-power-off text-danger" title="{% trans 'Force Restart' %}"></i>
<a href="/cluster/worker/manage/?uuid={{ worker.uuid }}" title="{% trans 'Edit' %}"><i class="far fa-edit"></i></a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="8" class="text-center text-muted">{% trans 'No workers configured' %}</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="/cluster/worker/manage/" class="btn btn-primary">{% trans 'Add Worker' %}</a>
<a href="/cluster/settings/" class="btn btn-secondary">{% trans 'Cluster Settings' %}</a>
{% endblock %}