{% extends "base.html" %} {% load i18n %} {% block content %}

{{ worker.name }} {% if not worker.enabled %} {% trans 'Disabled' %} {% elif worker.error_status %} {% trans 'Refused' %} {% elif worker.is_online %} {% trans 'Online' %} {% else %} {% trans 'Offline' %} {% endif %}

{% if worker.error_status %}
{{ worker.get_error_status_display }}
{% endif %} {% if worker.enabled and not worker.error_status and not worker.is_online %}
{% trans 'The worker is offline. The information below is the last state it reported.' %}
{% endif %} {% if worker.outdated %}
{% trans 'The worker is outdated. Please update it to the latest version.' %}
{% endif %}
{% trans 'Hostname' %}
{{ worker.hostname|default:'-' }}
{% trans 'IP Address' %}
{{ worker.ip_address|default:'-' }} {% if worker.ip_lock %}{% endif %}
{% trans 'Location' %}
{{ worker.city|default:'' }}{% if worker.city and worker.country %}, {% endif %}{{ worker.country|default:'' }}{% if not worker.city and not worker.country %}-{% endif %}
{% trans 'Last Seen' %}
{% if worker.status %}{{ worker.status.last_seen|date:"SHORT_DATETIME_FORMAT" }}{% else %}{% trans 'Never' %}{% endif %}
{% trans 'Version' %}
{% if worker.status %}v{{ worker.status.worker_version }}{% else %}-{% endif %} ({% trans 'current' %}: v{{ current_worker_version }})
{% if distributed %}
{% trans 'WireGuard instances' %}
{% for instance in worker.hosted_instances %} wg{{ instance.instance_id }}{% if instance.name %} · {{ instance.name }}{% endif %} {% empty %} - {% endfor %}
{% endif %}
{% trans 'App Gateway' %}
{% if worker.runs_gateway %}{% trans 'Enabled' %}{% else %}{% trans 'Not installed' %}{% endif %}

{% trans 'Synchronization' %}

{% for section in sections %} {% endfor %}
{% trans 'Section' %}{% trans 'Status' %}{% trans 'Last update' %}
{{ section.name }} {% if section.state == 'synced' %}{% trans 'Synchronized' %} {% elif section.state == 'error' %}{% trans 'Error' %} {% else %}{% trans 'Pending' %}{% endif %} {% if section.message %}
{{ section.message|truncatechars:300 }}{% endif %}
{{ section.updated|date:"SHORT_DATETIME_FORMAT"|default:'-' }}

{% trans 'Services' %}

{% for service, state in worker.services %} {{ service }}: {{ state }} {% empty %} {% trans 'No report received yet.' %} {% endfor %}
{% if certificates %}

{% trans 'Certificates served' %}

{% for certificate in certificates %} {% endfor %}
{{ certificate.hostname }} {% if certificate.status == 'trusted' %}{% trans 'Trusted' %} {% elif certificate.status == 'untrusted' %}{% trans 'Self-signed' %} {% else %}{% trans 'Unavailable' %}{% endif %} {{ certificate.issuer }}{% if certificate.not_after %} · {{ certificate.not_after|date:"SHORT_DATE_FORMAT" }}{% endif %}
{% endif %}

{% trans 'Installation' %}

{% blocktrans trimmed %} Copy cluster_node.yml (and cluster_node-gateway.yml to publish App Gateway applications) from the project repository to the worker, and create a .env file next to them: {% endblocktrans %}

MASTER_SERVER_ADDRESS={{ primary_address }}
TOKEN={{ worker.token }}
TIMEZONE={{ time_zone }}

{% trans 'VPN only' %}

docker compose -f cluster_node.yml up -d

{% trans 'VPN and App Gateway' %}

docker compose -f cluster_node.yml -f cluster_node-gateway.yml up -d
{% endblock %} {% block custom_page_scripts %} {% endblock %}