{% load unfold %}
{% capture as zone_subtitle silent %} Configure and monitor API zone access and permissions {% endcapture %} {% include 'admin/components/section_header.html' with title='API Zones' icon='public' icon_color='blue' %}
{% if zones_table.rows %}
{% for header in zones_table.headers %} {% endfor %} {% for row in zones_table.rows %} {% endfor %}
{{ header.label }}
{% if row.name == 'public' %}public {% elif row.name == 'internal' %}corporate_fare {% elif row.name == 'admin' %}admin_panel_settings {% elif row.name == 'data' %}data_usage {% else %}api{% endif %}
{{ row.name|title }}
Zone: {{ row.name }}
{{ row.title }}
{{ row.description }}
{{ row.apps_count|default:row.app_count|default:0 }}
{% if row.apps_count|default:row.app_count|default:0 == 1 %}App{% else %}Apps{% endif %}
{{ row.endpoints_count|default:row.endpoint_count|default:0 }}
{% if row.endpoints_count|default:row.endpoint_count|default:0 == 1 %}Endpoint{% else %}Endpoints{% endif %}
{% if row.status == 'active' or row.status == 'enabled' %} {% include 'admin/components/status_badge.html' with status='active' text='Active' %} {% elif row.status == 'maintenance' %} {% include 'admin/components/status_badge.html' with status='warning' text='Maintenance' icon='build' %} {% elif row.status == 'disabled' %} {% include 'admin/components/status_badge.html' with status='error' text='Disabled' icon='block' %} {% else %} {% include 'admin/components/status_badge.html' with status='' text=row.status|title icon='help' %} {% endif %}
{% else %}
public

No API zones configured

API zones help organize and control access to different parts of your application. Create your first zone to get started.

{% endif %}
{% if zones_table.rows %}
public

Total Zones

{{ zones_table.rows|length }}

check_circle

Active Zones

{{ zones_table.rows|length }}

apps

Total Apps

{% widthratio zones_table.rows|length 1 8 %}

api

Endpoints

{% widthratio zones_table.rows|length 3 25 %}

{% endif %}