{% extends "layouts/base.html" %} {% load static %} {% load i18n %} {% block title %}{{ zone.name }} - {% trans "Zone Details" %}{% endblock %} {% block extra_css %} {% endblock extra_css %} {% block breadcrumb %} {% endblock breadcrumb %} {% block content %}

{{ zone.name }}

{% if zone.is_active %} {% trans "Active" %} {% else %} {% trans "Inactive" %} {% endif %}
{% if zone.code %} {{ zone.code }} {% endif %} {% if zone.timezone %} {{ zone.timezone }} {% endif %}
{{ zone.channels_count|default:0 }} {% trans "channel" %}{{ zone.channels_count|pluralize }} {{ zone.relations_count|default:0 }} {% trans "relation" %}{{ zone.relations_count|pluralize }}
{% if zone.description %}

{{ zone.description }}

{% endif %}

{{ zone.channels_count|default:0 }}

{% trans "Channels" %}

{% trans "No change" %}

{{ zone.relations_count|default:0 }}

{% trans "Relations" %}

{% trans "Active" %}

{% if zone.is_active %} {% trans "Online" %} {% else %} {% trans "Offline" %} {% endif %}

{% trans "Status" %}

{% if zone.is_active %} {% trans "Operational" %} {% else %} {% trans "Inactive" %} {% endif %}

{{ zone.updated_at|timesince }}

{% trans "Last Updated" %}

{{ zone.updated_at|date:"M d" }}
{% trans "Zone Information" %}
{% trans "Name" %}: {{ zone.name }}
{% if zone.code %}
{% trans "Code" %}: {{ zone.code }}
{% endif %}
{% trans "Status" %}:
{% if zone.is_active %} {% trans "Active" %} {% else %} {% trans "Inactive" %} {% endif %}
{% if zone.timezone %}
{% trans "Timezone" %}: {{ zone.timezone }}
{% endif %} {% if zone.description %}
{% trans "Description" %}: {{ zone.description }}
{% endif %}
{% trans "Created" %}: {{ zone.created_at|date:"F d, Y \a\t g:i A" }}
{% trans "Updated" %}: {{ zone.updated_at|date:"F d, Y \a\t g:i A" }}
{% trans "Associated Channels" %} {{ zone.channels_count|default:0 }}
{% if zone.associated_channels %} {% for channel in zone.associated_channels %}
{% if channel.description %} {{ channel.description|truncatechars:50 }} {% endif %}
{% if channel.is_active %} {% trans "Active" %} {% else %} {% trans "Inactive" %} {% endif %}
{% endfor %} {% else %}

{% trans "No channels associated with this zone" %}

{% endif %}
{% trans "Zone Relations & Configurations" %} {{ zone.relations_count|default:0 }}
{% if zone.zone_relations %}
{% for relation in zone.zone_relations %} {% endfor %}
{% trans "Channel" %} {% trans "Stream URL" %} {% trans "Codec" %} {% trans "VPN Config" %} {% trans "Status" %} {% trans "Actions" %}
{{ relation.channel.display_name|default:relation.channel.name }}
{{ relation.channel.id }}
{% if relation.zone_stream_url %} {{ relation.zone_stream_url|truncatechars:30 }} {% else %} - {% endif %} {% if relation.codec_override %} {{ relation.codec_override }} {% else %} {% trans "Default" %} {% endif %}
{% if relation.use_ipsec %} IPSec {% endif %} {% if relation.use_openvpn %} OpenVPN {% endif %} {% if relation.use_wireguard %} WireGuard {% endif %} {% if not relation.use_ipsec and not relation.use_openvpn and not relation.use_wireguard %} {% trans "None" %} {% endif %}
{% if relation.is_active %} {% trans "Active" %} {% else %} {% trans "Inactive" %} {% endif %}
{% else %}
{% trans "No zone relations configured" %}

{% trans "Zone relations define how channels are configured within this zone." %}

{% endif %}
{% trans "Quick Actions" %}
{% trans "Recent Activity" %} {{ zone.activity_logs.count|default:0 }}
{% if zone.activity_logs %}
{% for log in zone.activity_logs|slice:":10" %}
{% if log.action == 'created' %}
{% elif log.action == 'updated' %}
{% elif log.action == 'deleted' %}
{% elif log.action == 'activated' %}
{% elif log.action == 'deactivated' %}
{% else %}
{% endif %}
{{ log.get_action_display|title }}

{{ log.description }}

{% if log.user %} {{ log.user.get_full_name|default:log.user.username }} {% endif %}
{{ log.created_at|timesince }} {% trans "ago" %}
{% endfor %}
{% if zone.activity_logs.count > 10 %}
{% endif %} {% else %}
{% trans "No activity recorded" %}

{% trans "Zone activity will appear here as actions are performed." %}

{% endif %}
{% endblock content %} {% block modals %} {% endblock modals %} {% block extra_js %} {% endblock extra_js %}