mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-01-01 14:16:18 +00:00
87 lines
3.8 KiB
HTML
87 lines
3.8 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.error_status %}
|
|
<i class="fas fa-exclamation-triangle text-danger blink" title="{{ worker.get_error_status_display }}"></i>
|
|
{% else %}
|
|
{% if worker.enabled %}
|
|
<i class="fas fa-check text-green"></i>
|
|
{% else %}
|
|
<i class="fas fa-times text-gray"></i>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if worker_version > worker.workerstatus.worker_version %}
|
|
<i class="fas fa-cloud-download-alt text-primary blink" title="{% trans 'The worker is outdated. Please update it to the latest version.' %}"></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 %} |